Created
December 21, 2020 18:51
-
-
Save derhuerst/93d98c0f83406cd864e17ce93e2b95df to your computer and use it in GitHub Desktop.
tolino web reader (webreader.mytolino.com) source code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(e) { | |
var t = {}; | |
function n(r) { | |
if (t[r]) | |
return t[r].exports; | |
var o = t[r] = { | |
i: r, | |
l: !1, | |
exports: {} | |
}; | |
return e[r].call(o.exports, o, o.exports, n), | |
o.l = !0, | |
o.exports | |
} | |
n.m = e, | |
n.c = t, | |
n.d = function(e, t, r) { | |
n.o(e, t) || Object.defineProperty(e, t, { | |
enumerable: !0, | |
get: r | |
}) | |
} | |
, | |
n.r = function(e) { | |
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { | |
value: "Module" | |
}), | |
Object.defineProperty(e, "__esModule", { | |
value: !0 | |
}) | |
} | |
, | |
n.t = function(e, t) { | |
if (1 & t && (e = n(e)), | |
8 & t) | |
return e; | |
if (4 & t && "object" == typeof e && e && e.__esModule) | |
return e; | |
var r = Object.create(null); | |
if (n.r(r), | |
Object.defineProperty(r, "default", { | |
enumerable: !0, | |
value: e | |
}), | |
2 & t && "string" != typeof e) | |
for (var o in e) | |
n.d(r, o, function(t) { | |
return e[t] | |
} | |
.bind(null, o)); | |
return r | |
} | |
, | |
n.n = function(e) { | |
var t = e && e.__esModule ? function() { | |
return e.default | |
} | |
: function() { | |
return e | |
} | |
; | |
return n.d(t, "a", t), | |
t | |
} | |
, | |
n.o = function(e, t) { | |
return Object.prototype.hasOwnProperty.call(e, t) | |
} | |
, | |
n.p = "", | |
n(n.s = "./node_modules/babel-loader/lib/index.js!./musketeer/modules/tolino-cloud/bookshelf.worker.js") | |
}({ | |
"./musketeer/modules/tolino-shared/globals.js": function(e, t, n) { | |
"use strict"; | |
t.a = { | |
APP: { | |
DOM_ROOT_CONTAINER_ID: "outer-container", | |
VERSION: "5.2.0" | |
}, | |
DATA: { | |
STORE_KEY: "tolino" | |
}, | |
DEMO: { | |
DEVICE_KEY: "DEMO::DEV::KEY", | |
HARDWARE_ID: "DEMO::HARWARE::ID", | |
USER_ID: "DEMO::USER" | |
}, | |
ENV: { | |
DEVELOP: "development", | |
PRODUCTION: "production" | |
}, | |
ERROR: { | |
MISSING_COUNTRY_SELECTION: "MISSING_COUNTRY_SELECTION", | |
MISSING_HARDWARE: "MISSING_HARDWARE", | |
MISSING_RESELLER_ID: "MISSING_RESELLER_ID", | |
MISSING_RESELLER_CONFIG: "MISSING_RESELLER_CONFIG", | |
MISSING_TOKEN: "MISSING_TOKEN", | |
TOKEN_EXPIRED: "TOKEN_EXPIRED" | |
}, | |
LOCALIZATION: { | |
DEFAULT_LANGUAGE: "de_DE", | |
VALID_LANGUAGES: ["de_DE", "en_US", "es_ES", "fr_FR", "it_IT", "nl_BE", "nl_NL"], | |
DISPLAY_LANGUAGE: { | |
de_DE: "Deutsch (Deutschland)", | |
en_US: "English (U.S.A)", | |
es_ES: "Español (España)", | |
fr_FR: "Français (France)", | |
it_IT: "Italiano (Italia)", | |
nl_BE: "Nederlands (België)", | |
nl_NL: "Nederlands (Nederland)" | |
}, | |
RESELLER_DEFAULT_LANGUAGE: { | |
1: "de_DE", | |
3: "de_DE", | |
4: "de_DE", | |
5: "de_DE", | |
6: "de_DE", | |
7: "de_DE", | |
8: "de_DE", | |
10: "de_DE", | |
11: "de_DE", | |
12: "de_DE", | |
13: "de_DE", | |
20: "de_DE", | |
21: "de_DE", | |
22: "de_DE", | |
23: "de_DE", | |
24: "de_DE", | |
30: "de_DE", | |
40: "de_DE", | |
60: "nl_NL", | |
61: "nl_BE", | |
80: "de_DE", | |
81: "de_DE", | |
82: "nl_NL", | |
90: "it_IT", | |
91: "it_IT", | |
92: "it_IT" | |
} | |
}, | |
MEDIA: { | |
IMAGE_DEFAULT_AUDIO: "assets/common/fallback-cover-audio.svg", | |
IMAGE_DEFAULT_PUB: "assets/common/fallback-cover-read.svg", | |
IMAGE_DEFAULT_VIDEO: "assets/common/poster-image-video.svg", | |
IMAGE_DEFAULT_VIDEO_UNSUPPORTED: "assets/common/poster-image-video-unsupported.svg", | |
IMAGE_NULL: "data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D", | |
IMAGE_PLACEHOLDER: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACCCAYAAADWiVPZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAE5lJREFUeNrsndlvHEXXxqt7xuPxvsZ2Qvb3AwmQ4BPcwAX/OlwCEkgvSHCDQhLHSex4txNvs731O9Wnp2YyY4+XrH0euTVbd/UsTz9nqXPKSavVcgbD+47UvgKDEdVgMKIajKgGgxHVYDCiGoyoBsO7Qzl+kCSJfSOG9wZxjt8U1WCm32B4I6a/B5KuWyO24SrRVCvfdXsuoibRBkFL2W1ihDVcAUFb2W0jetyXrIMoKgQdyrZy9rgUqazBcK4YKSMnW91vtWxrXEZR04ygFR+Bbdl3bLhqJEkyGxG4dVFFVTUdta/U8IYw2qWy547602yDzFX7Pg1vCNWMY+lpfDwrKFIftWLfp+ENoTJIzHOW6ddo/7X9trbMZTWcH7Ozs704WDpLNMsDjN03HdXjpAZDX/QRt9QNkEGyfKjhg4AR1WBENRiuCuXLHGyt1gZTVIPBiGowohoMRlSDEdVgMKIaDJeDpacMHz9RP2xb0p5eTlqvX4Bpmg58ga6trbmNjQ13cnLiyuWym5qacjdu3HBDQ0Oyr7ahNxoNud899nkv+CIKRNmu1R4c9kSCDAcHB+7w8NA1m00h4OjoqKtWqx3rH0DSZ8+e5eSu1+tCWo65c+dO/tz6+oYf60COnZiYcDMzM65UKplVMqJeHJAMAr548cLVajUhE6QaHq5Ixdj8/LxXy4q8trGx7l9vurGxcXft2jW3u7vrdnZ2ZJubm/OkHHcrK08y8oZOi62tTffy5b67efOWXADnIWtRiW1E7QKKB8lUJTHfkAmzjiI+e3bo9vZ2hWQQ+uTkSFRzYWFBSDw5OemOj49FjRnn+PhIiFkqpZ60ozL+/v5Lt7m57kZGRt3i4mJOwEFWqmEfM/2G3OQ3Gk1PpKon5E2vlmPy3Pr6mifZvlfDl+7Ro4fiBrB/pVKW+wBio6Tsj7ru7+/K84xx7949UdXl5cdue3vbE35P1Bm1NkW1qL+3Mp1Zq9sSJR0fHxfyVSoVMeMvXgSX4OjoSEx/mpZE5WIxRFk3NzdlH1rWIeL169f9OMPyOuOgtqg0AdZ5iFpUshY2j5o2Q7TP1kraG6SrViuOwByzjbmHtK0WhCp7wn3ibt++64k77OBLyx+E+kI4JRHEI2DCd0VBp6dnPOEn2+pQHspNuJIukD3eOGtTtrbzXNzAq7BEPe0nJ7pHQWu1E/EvIRwazC3EImK/deu2EC4QrdNv1MgeskH4iYnJLv8zyR53pq5evXqZuRb77sSfO03S/N0KqbOLyUx/oYjaytmKG9AKd8RUV6sjQsbV1VUx0ZBubu6aBE9KmunpaTH9T548keebzUZOUlCtDkuQxcORkeGOgAlScr9cTuV829ubckEcHBy6pldn5KPij7+xdMNNTU5l5y32wjSFJqr6qWJquyLrxcUlUTjI8/z5c4nQR0fHcsKxETShgNvbWx2mn+Mx//i4aZpIKismsd7HLVhZWZGgCn9VJgNQUf9X26u5p/WnbuT/quLbNlHsxIhauGCKmSkhqP8IJPWJ5Gu1uidP3ROsJFH8pFezk5OakOjJk2V39+49NzxczT87ikmQBKFJScWAqCMjI6KG3cGSfm0h5XUo7wMFn5qalAsCFQ8zXUcSkFUq1Q5nxdJTBYJq6IuNdbfmFROSBhIE8w4JdeYIIpFuevx42fumt4SAShjuLywsutrJUe5zhmNSITXEV39URDG7L05Gk7TVhFtaWpSLQqdWeS8QlYzCaVO5RtQiRJGeSK8OXolZb9YbEjxVKkNuyJtrl5ENNcQPrddrYtpJ9D94cCL5UPKi6gLMzs54FdwW9WWcQEjnhr1v2mpU8mBLSYpKMvbi4oIn6XU5JvihAXvencDnHfNBHRdCR+RvRC2aojZc/eTYk7Qm+rawMC/J95AXTTPFa8o8vc40YaZJ4j948MDdvn1bAiox7Z7ck1MzgeBQMQke8JA32d0FLwcHpLyO3M2bt8VtiN0IsOX9Xc6ReDWfX1iQlFij1cgCPj9qK3EtI2qBfFSXyty9To+ickpSyKf5zKC0FYn8AWTFh1xfXxe1ZX6fb4F98iAtC5oqQ0OulKQd3xf+LNOtBGJ6MWhwBUGfrjwV039tYU78VvF3k1KWngoXQHBPjKjFiPr9D1+tjooqQjqWmyFCv379ppBXCdSdkMcUs6GyROuQdhISl9KO5CyUgrxpZPa5IMjRxm6DThBA0uXlZSF/2T/mwnm8/Ni7IkNudGzUTY5PutSfo2lTqMVLUKGeS0tLOekoxTs+ronfyNRpTFQllarl8PCwuAoce+LJNZwO9w3Y9HguAK1RVdXG5DPv//jx46xeNZX39nJv3710++JOpH6D3NQdjIyMeY/VFLUwIIeZpk1RPfxN1AyyspE7xewyZ496qv8Yq6DWrELYbhKf5hLpaxwPMVFk1BzXgiwBkwPMeEFWgjjytPq+Hj165O7f/4/4rUbUApl+3SAIBKDgZGsrRO+kh3RWitI9FA01VIIqKTHFSQ8S9jqX3ufQmj/HoTfvEP3+/fuitl2XkmgyM2LMXD19+tT7t6+yOtd5I2pRgqlAOCcBVPgsYU7+1asDMefBpzzy5D2Q4mgmAEbHJ6T0b8TfR4mZceomJX4uSnh0dCiqXfbkZkpWFLQZWlEoNWHOfnxi3Lu2IVDSNpXcw80CJtSTCwU/msxDTHojahHSU0lJSEXQQg6UYIZKKS27Qz2Hh8dF8bgfCBb+m1Gd6VKviKhplZkqKXUK7gCq9/z5M7kVF0F6qKbdde/3lodCNX8iqauKHBNH/bEABP+1JIRF3SEpF4f6zkbUwhDVSc0oLSeBoHVRzTCVOSX3IWiY/mz/XzjVsiaVVM3MBUiywhZPMMbDPHMcr9VrdVFDVPre3XuuVC61fdpWLwuVZMUsLZnWXV9/IeNB6E8++URckHq9YUQtCjY3N8Tvq9UaQkiS78wwoVpJlPvUPichUZrkpG3XjLpMTUt5PjYUowRftpRF7QRDuBAoa8O1/dru9pOQaz2Uaqrd3eAv8/6I+EPu1dJThfJRUSpmncbGRt2tW3e8SdXcZjMjZ49kU6uzxbqZB1WhEipUTJW8Qrf9zVCZlUjif3d71837QGgoy9Ni9Gukt7JKf1SXKP/g4JUovNa1an1BKA+0Cv9CIZTVOSECJI0JOUg9HaY/rsiH4BB1dnYuTz3FEb8EZ7UTOW8zKwaQfzmTVVlVswAtuBwV8Z85jgmA0CR4nAVuxaz1K7CPGn5wTDI9UPQxhY7ToXONA4FQZoIuVBLzTEEJvmq4GNJMcZvi+4ailfZsF0SFgJybWSuOZ8ydnS3vnmyJulKzitJi/plN04vAiFoA4I+uroZAamVlWYhGPpUKKjYIi6/Z6UO2E/8oHfP+ujKKprvAtWuLXqUnskzCoTzP+EwgaB9/PEXL/dicQ+bFxet+3BlP+NXgr+7tOrfCohb3C6mqhfVRqeDHxGq3KOkfNjXlEC+Y31iB06wyv5mrJ1kCbZvWmlNANwCbqp+OGT/u18evvijj4p/S1rK2uibrATDdSrOgEbVApp+5eopSUD3MLRtKqcGNaGgWvfM8s0X1eljeBzPM8XE3qfqi3OIOhDRTu/GP5xTc5zzashKrd5iidRJQqd+LOh/vHvuL6th81CJBo2dmfiYmpryZzaZExQw3c5KSswzmd0vaovEjyWeSeFd1JdjRgCgugNbCE71tkzDNK7TIlaLk3Nf1A4aGynJR6PnDPoei8Ky4YkQtlqZGhG1KW0jcwgyBCWTIte5LxX1LfFHapLUQBVWkQwBl5LXu4pTYB9UJAB6zP2MouXmMYmLWmRwgGIOQnb3/ibStzMzMGlGL5KPGkXf8XJItQsGEACTEf+Xx3NysV9JbWS9/8CNplUZpcQNQSIjb7XdCUBRT1RJAStSS4IrXQ/C0KK6EZCHW17yK7knBNOOh4tPTs3IxMA7ENqIWzgXoXqmkla/kB/EgIFX8NOAlSVkUF6KgtLRJo4zkYnWSQE19fBEwDsSWQmpPUIpMKNnDZYCc2j3AawRnTJOuvXjuNjc2ZSxcDtJnnCv4yqaohQ2s1GRveHKsrj4X4kGMMLU6m/uurJ6CkqJ8mGciclpaMNc6BsEZpNQACaKizIHQTTH5EJRxUFuIiVpyyzkrQxV348YtN1Idk0Uw8E9JpeEbF7Ur1YgaBTgQDCVVklJQTdCkETxrUWnyHZMN6UZHR+Q+QQ+kRPEIfqSXKsoGcIwqtCb/SY3pmgJsvKatLmzarwXJ2e8iC6oZUT8yooZ1S/e9WT8WPxD1QgEhh5KYNVOVpJoXJVeqpp7ClL29rTx44ti4k5UxVFUhJfe1iEVJjv+KWitUQbWSK84qGFELGEyFRXlPJFCK6z4hGWqH36qk0sCJ25DsD+TR1hJ80Pi7CeO2pEY1rPIXXuMc1JoyDmv+4wawD/szvpISl4DOVUjbPYtlRC2Yj8qm7SAoGxE/jyEPKqpmF8JAJKJ9onFVuXK5IiRlf3xaVWlN7APNl6pPrH4sr+vyQJxbN1VzLd4u4hy/ETVSVlWo6alpqfanjQRfNZ5VwmekY3V6eso9fPgoU9RSPnMFAbe3tvNuU/V7dbaLsbiPKrO+lJp/CMjzKKm2UWsqS81+iPwbhf6dijsz1bl8n/QxDfsI/vadu24za/0gVYVSYq5ZwIzeJwIqFoigKqpUCkXWeA87u1tu/+WuzB7FgTl+qa7U12jUZKl0AjDGxrK315uq5RdNr/aU9oVlPmqhfNReaHgSjGSFILqGaShOSXNVa7VCcYpOwdJ7dXCwL9OsNO9ps54WoLAoL6QMbVUtCZaoL9CV/pSQGnid9g8n4k7WoqG4K05HqaMYQsh6u8JJO0R1X8w9eVOIiO/67NlT9+TJiifrsStn/fbtFQBD6on7pKNK2Qoo+L+hjrWW+69nEbTo/4+q0Cul9LvbjzTqf6KIkBSzjm9JEcmsf44VUzRqp6hkZ2dTJgh0ihSiMpfPqoDhH1WU85kmTVHFq1q/fn4n6mxELVKk30GEaP39qNO0m7AaxeOzkmeliARiQdzp6UlRVkBGALKSD4Vw+p9VICuPmXqltlQ7Tklxobhts95yvZr4Eltxuog+anKWzr72+eJ6U4hFvlT8p8yPJZpHLbUIm/a96khVZql0P1JQHLu3ty9qSpUW6SxSUHG9qjvjfRhRC+Sjuj7KOahvq9OZWjVFxT+mfnd3R5r/Jjxxl5Zu5HWqSnTSUHS/tltbXOHTT0bUfhF+o9VHR88zxuvkmp+/JlsMVgjsOtKYZ1G/wRT1o/JRDaaoBoMR1WBENRiMqAaDBVMGU1SDwYhqMBhRDeajmo9qMEU1GK5UUd8W/vrrLympo0XkPPj555/dl19+mZfjXcWYMXTFFM7xpo9h4YsYNBry79i7x+SWz/b9999f6XdpRB0AfPkUHr9vY1LhHy8W8abAeYCSjzpWLkJuP/vss459eY4VWN7md2lEvST6qcq7xFUoGURDUZWQH5o6fvTBVK/zoRB//PFHrhJffPFFbup/+eWX/DGLjf3999+yaAQdoNqrpGPymv7wkODTTz/Nn2d/2ku4Zbxe74v3wb56vn7jYcLZl/30Pu+d98ftt99+21fx4s/PcRRq81w8Znen6lmf24KptwC+dCXjd999Jz1J/CgKiKL/FOLPP/90X3/9tezHeqaxyf7nn3/k8Q8//CCv4/MpyXj+4cOH7quvvupJUjXNvA/GhaSnjRe7C9xnbI5jX9pXun3RmJicg+3HH3+Utmslfz8X5KzPbUR9S2A9KLo3w3+0c/JD6Ap5MVCVeD9uUZc4WOHY2KzGhGH/firHhfDbb78JaXSMs8aLEb8XVK9f3xQXAGRjg9TsG1+UvXDW5zYf9S0BQvLDojIxUKb4B2EfftgY8WNVNiUTx8evdx/brXSQKFaqs8a7Ch/17t277vfff++r8oN8biPq23rz5XKuNLG5705Hsd9pKzXzw/ODq/JAtEFXduYY/MqffvpJzq3qe9HxzkPWQb6fj2WF6g/a9Gvkqz8G91GZXvuheOoScBuncPBtcSMUBGfx40FIg+lXU3zZ8QYBwR2f66zv57TPHb9mUf8VIQ5I1Gf7/PPPJcjB9EMOTC3P6Wp6+h5pV4ZI5B7xHSENroG2PXPMr7/+KkTTJR/v3LnTMUbvlUvar2OKOf+///576ni9xozH7nUuzSqoi8N4XBzffPPNqWOe9bl5f6wpoEHZ+4zklP52SIyjhx2d9/v9t/uKTt6TpTtQBfUDTwsWdD9I3st06oWgJvuyuOrxLvv99PvcbzO9yIXRQcAk+X9/s4HA81ZxrXsJ4UeR8Nc17y+731UT6l0T9Lzfj/moBoMR1WBENRiMqAbD4LAKf4MpqsFgRDUYUQ2Gj8ZH7Z5hMBjetaISMTXtqzK8ITTdAEt+pwMMwjredfs+DW8I9YxjzcsQtZUNcmLfp+EN4STjWOuiPmoz22D8UZIkNKJP+I0S8aqzf/hruLiCHvntwG/72f16xLcLBVMwvZYNCo79VsmOs4yB4aI+aT1TUiVszZ3xr2LKAwRRtegxRC1lW2LfueECUHdSY59atp0aVJUHHFRv04ygpqaGq4j0m1EgdWEftRXdxkQ1GK6SsN1cu7CixreWTzW8E5hCGj4IdCiqle0ZTFENBiOqwYhqMBhRDQYjqsGIajAYUQ0GI6rhw8T/BBgAMlAZRpNGowIAAAAASUVORK5CYII=" | |
}, | |
MIME_TYPES: { | |
epub: "application/epub+zip", | |
pdf: "application/pdf", | |
jpg: "image/jpeg", | |
jpeg: "image/jpeg", | |
png: "image/png", | |
gif: "image/gif", | |
svg: "image/svg+xml", | |
otf: "application/x-font-opentype", | |
ttf: "application/x-font-ttf", | |
woff: "application/font-woff", | |
acsm: "application/vnd.adobe.adept+xml", | |
m4a: "audio/mp4", | |
aac: "audio/mp4", | |
mp3: "audio/mpeg", | |
ogg: "audio/ogg", | |
oga: "audio/ogg", | |
wav: "audio/x-wav", | |
mp4: "video/mp4", | |
m4v: "video/mp4", | |
webm: "video/webm", | |
ogv: "video/ogg" | |
}, | |
MISC: { | |
COLLECTION_CATEGORY: "collection", | |
SUBSCRIPTION_CATEGORY: "subscription", | |
SYSTEM_CATEGORY: "system", | |
COLLECTION_NAME_MAX_LENGTH: 255, | |
NICKNAME_MAX_LENGTH: 23, | |
SEARCH_TERM_MIN_LENGTH: 3, | |
DIALOG_FADEOUT_TIME: 3e3, | |
DOUBLE_TAP_MAX_DELAY: 250, | |
LONGPRESS_MIN_DURATION: 600, | |
TAP_TRESHOLD: 6, | |
SWIPE_TRESHOLD: 75, | |
PROTECTION_TYPE: { | |
ACS4: "Adobe DRM", | |
ACSM: "Adobe DRM", | |
TDRM: "DRM", | |
NONE: "Unprotected", | |
WATERMARK: "Watermark" | |
}, | |
UI_ACTION_TYPE: { | |
NONE: 0, | |
DELETE_TITLE: 1, | |
DELETE_TITLES: 2, | |
ADD_TO_COLLECTION: 3, | |
ADD_TO_DEFINED_COLLECTION: 4, | |
REMOVE_FROM_COLLECTION: 5, | |
CHOOSE_COLLECTION_TO_ADD: 6, | |
CREATE_COLLECTION: 7, | |
CREATE_COLLECTION_WITH_SELECTION: 8, | |
DELETE_COLLECTION: 9, | |
DELETE_COLLECTIONS: 10, | |
RENAME_COLLECTION: 11, | |
MARK_AS_FINISHED: 12, | |
SHARE: 13, | |
EDIT_NICKNAME: 14, | |
LEAVE_FAMILY: 15, | |
REMOVE_FROM_FAMILY: 16 | |
} | |
}, | |
NET: { | |
BACKEND_BASE_URL: "https://bosh.pageplace.de/bosh/rest", | |
CLIENT_TYPE: "TOLINO_WEBREADER", | |
HARDWARE_TYPE: "[test] React Client", | |
RESELLER_GROUP: 27, | |
REST: { | |
ENDPOINT_CONFIG: "v2/resellerconfig", | |
ENDPOINT_COUNTRY: "reseller/countries/", | |
ENDPOINT_INVENTROY: "inventory", | |
ENDPOINT_REGISTER_HW: "v2/registerhw", | |
ENDPOINT_RESELLERS: "reseller/selection/" | |
}, | |
SIMULATOR: { | |
OAUTH_CLIENT_ID: "simulatorId", | |
OAUTH_SCOPE: "simulatorScope", | |
OAUTH_TOKEN_DEMO_USER: "RGFzIGlzdCBlaW4gRGVtby1Ub2tlbg==", | |
RESELLER_ID: 1, | |
URL_OAUTH_AUTHORIZATION: "https://simulator.prodref.pageplace.de/oauth-simulator/", | |
URL_OAUTH_REDIRECT: "http://127.0.0.1:3000", | |
URL_OAUTH_REVOKETOKEN: "https://simulator.prodref.pageplace.de/oauth-simulator/oauth/revoke", | |
URL_OAUTH_ACCESSTOKEN: "https://simulator.prodref.pageplace.de/oauth-simulator/oauth/token" | |
}, | |
METADATA: { | |
SYNC_PATH: { | |
DOGEAR: "/dogears", | |
COMMENT: "/comments", | |
BOOKMARK: "/bookmark", | |
TAG: "/tags" | |
}, | |
SUBSCRIPTION_CATEGORY: "subscription", | |
TAG_FINISHED_HEARINGS: "collection_finished_hearing_name", | |
TAG_FINISHED_READINGS: "collection_finished_readings_name", | |
TAG_FAMILY_SHARING_EBOOK: "collection_family_sharing_name", | |
TAG_FAMILY_SHARING_AUDIO: "collection_family_sharing_audio", | |
SYNC_OP: { | |
ADD: "add", | |
REMOVE: "remove", | |
REPLACE: "replace" | |
}, | |
SHELF_REVISION: "shelf_revision", | |
SHELF_SYNC_TIME: "shelf_sync_time", | |
SYNC_DEFAULTS: { | |
"/bookmark": { | |
progress: 0 | |
}, | |
"/dogears": {}, | |
"/comments": {}, | |
"/tags": {} | |
}, | |
SYNC_VALUES: { | |
"/bookmark": { | |
revision: "revision", | |
modified: "modified", | |
progress: "progress", | |
position: "rmsdkPosition", | |
currentPosition: "currentPage", | |
lastPosition: "lastPage" | |
}, | |
"/dogears": { | |
revision: "revision", | |
modified: "modified", | |
position: "rmsdkPosition", | |
name: "displayName" | |
}, | |
"/comments": { | |
revision: "revision", | |
modified: "modified", | |
startPosition: "rmsdkPosition", | |
endPosition: "endPosition", | |
note: "markerComment", | |
text: "markedBookText" | |
}, | |
"/tags": { | |
revision: "revision", | |
modified: "modified", | |
name: "name", | |
category: "category" | |
} | |
} | |
} | |
}, | |
READER: { | |
CONTAINER_ID: "rxContainer", | |
SPACER_CLASSNAME: "rxVSpace", | |
LAUNCHER_UI_ID: "koboReadingExperience", | |
MIN_HEIGHT: 240, | |
IMG_HEIGHT_PADDING: 32, | |
SLIDER_PRECISION: 4, | |
SLIDER_UPDATE_INTERVAL: 50, | |
SMIL_ID: "rxMediaOverlay", | |
STYLES_SHEET_ID: "ePubReaderCSS", | |
SYNC_BOOKMARK_DELAY: 1e3, | |
TIMEOUT_PAGE_LAYOUT: 400, | |
TAP_AREA_PAGING: .2, | |
UI_FADEOUT_TIME: 3e3, | |
UI_FADEOUT_TIME_TOUCH: 5e3, | |
ANNOTATIONS: { | |
COMMENT_COLOR: "rgba(255, 253, 110, .6)", | |
DOGEAR_CLASSNAME: "rx-dogear", | |
SEARCHMARK_COLOR: "rgba(162, 203, 229, 1)", | |
TEXT_SAMPLE_MAX_LEN: 80 | |
}, | |
FONT: { | |
DEFAULT_SETTINGS: { | |
fontFamily: "default", | |
fontSizeIdx: 8, | |
lineHeight: "default", | |
textAlign: "default", | |
backgroundMode: "rx-bg-normal", | |
readingMode: "paged" | |
}, | |
CUSTOM_SHEET_ID: "rxCustomFonts", | |
PUBLICATION_SHEET_ID: "rxPublicationFonts", | |
BASE_PATH_FONTS: "assets/fonts/", | |
CUSTOM: { | |
bitter: { | |
id: "bitter", | |
name: "Bitter", | |
preview: "<path d='M2-1.28L0.64-0.96L0.64 0L5.2 0C7.84 0 9.28-0.96 9.28-3.2C9.28-4.48 8.48-5.42 6.8-5.81C8.14-6.14 8.88-6.96 8.88-8.4C8.88-10.32 7.44-11.2 5.44-11.2L3.6-11.2L0.64-11.12L0.64-10.24L2-9.92ZM3.6-6.4L3.6-9.92L5.36-9.92C6.4-9.92 7.2-9.36 7.2-8.24C7.2-6.96 6.24-6.4 4.8-6.4ZM3.6-1.28L3.6-5.2L4.8-5.2C6.56-5.2 7.6-4.72 7.6-3.12C7.6-1.92 6.8-1.28 5.28-1.28ZM11.76-11.12C11.76-10.4 12.16-10 12.8-10C13.28-10 13.84-10.4 13.84-11.12C13.84-11.92 13.44-12.24 12.8-12.24C12.24-12.24 11.76-11.84 11.76-11.12ZM14.88-0.88L13.68-1.28L13.68-8.48L10.72-8.4L10.72-7.52L12.08-7.2L12.08-1.28L10.72-0.88L10.72 0L14.88 0ZM21.28-8.4L18.96-8.4L18.96-10.74L17.36-10.42L17.36-8.4L15.76-8.24L15.76-7.2L17.36-7.2L17.36-2.16C17.36-0.37 18.24 0.16 19.2 0.16C20 0.16 20.72-0.11 21.44-0.64L21.01-1.49C20.59-1.26 20.14-1.09 19.76-1.09C19.31-1.09 18.96-1.33 18.96-2.06L18.96-7.2L21.28-7.2ZM27.6-8.4L25.28-8.4L25.28-10.74L23.68-10.42L23.68-8.4L22.08-8.24L22.08-7.2L23.68-7.2L23.68-2.16C23.68-0.37 24.56 0.16 25.52 0.16C26.32 0.16 27.04-0.11 27.76-0.64L27.33-1.49C26.91-1.26 26.46-1.09 26.08-1.09C25.63-1.09 25.28-1.33 25.28-2.06L25.28-7.2L27.6-7.2ZM35.92-4C35.92-4.03 36-4.48 36-4.88C36-7.28 34.96-8.64 32.64-8.64C30.32-8.64 28.72-6.72 28.72-4.16C28.72-1.52 30 0.16 32.56 0.16C34.48 0.16 35.97-1.17 35.97-1.17L35.41-2C35.41-2 34.32-1.12 32.72-1.12C31.34-1.12 30.4-2.24 30.4-4ZM30.46-5.2C30.56-6.4 31.28-7.39 32.56-7.39C33.84-7.39 34.3-6.4 34.3-5.2ZM40-8.48L37.36-8.4L37.36-7.52L38.72-7.2L38.72-1.28L37.36-0.88L37.36 0L41.92 0L41.92-0.88L40.32-1.28L40.32-6.03C40.67-6.5 41.44-7.28 42.64-7.28L42.88-6.08L43.92-6.08L44-8.4C44-8.4 43.36-8.64 42.56-8.64C41.47-8.64 40.54-7.76 40.14-7.31Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "Bitter-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "Bitter-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "Bitter-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "Bitter-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
droidSerif: { | |
id: "droidSerif", | |
name: "DroidSerif", | |
preview: "<path d='M0.61 0L0.61-0.67L0.81-0.67Q1.09-0.67 1.32-0.71Q1.56-0.75 1.74-0.87Q1.92-0.99 2.02-1.22Q2.13-1.45 2.13-1.82L2.13-9.66Q2.13-10.02 2.02-10.23Q1.91-10.45 1.73-10.56Q1.55-10.68 1.32-10.71Q1.08-10.75 0.81-10.75L0.61-10.75L0.61-11.42L5.51-11.42Q6.74-11.42 7.71-11.04Q8.68-10.66 9.35-9.94Q10.02-9.21 10.37-8.15Q10.72-7.09 10.72-5.73Q10.72-4.41 10.39-3.36Q10.06-2.3 9.41-1.55Q8.77-0.8 7.79-0.40Q6.81 0 5.51 0L0.61 0M3.74-0.81L5.13-0.81Q6.09-0.81 6.8-1.14Q7.52-1.46 7.99-2.09Q8.47-2.71 8.71-3.63Q8.95-4.54 8.95-5.73Q8.95-8.11 8-9.37Q7.05-10.63 5.15-10.63L3.74-10.63L3.74-0.81ZM11.25 0L11.25-0.67L11.3-0.67Q11.57-0.67 11.81-0.71Q12.05-0.75 12.22-0.87Q12.4-0.99 12.5-1.22Q12.61-1.45 12.61-1.82L12.61-6.81Q12.61-7.16 12.5-7.38Q12.4-7.59 12.22-7.71Q12.04-7.83 11.8-7.87Q11.56-7.91 11.3-7.91L11.25-7.91L11.25-8.58L13.71-8.58L14.02-6.99L14.09-6.99Q14.25-7.35 14.41-7.67Q14.58-7.98 14.82-8.22Q15.05-8.46 15.41-8.60Q15.76-8.73 16.29-8.73Q17.16-8.73 17.59-8.43Q18.02-8.13 18.02-7.57Q18.02-7.32 17.93-7.11Q17.85-6.9 17.67-6.75Q17.49-6.59 17.21-6.51Q16.93-6.43 16.52-6.43Q16.52-7.09 16.34-7.39Q16.15-7.68 15.68-7.68Q15.38-7.68 15.15-7.51Q14.91-7.34 14.74-7.07Q14.56-6.79 14.44-6.43Q14.32-6.07 14.25-5.69Q14.17-5.31 14.14-4.94Q14.11-4.56 14.11-4.26L14.11-1.74Q14.11-1.39 14.21-1.18Q14.32-0.96 14.5-0.85Q14.68-0.74 14.92-0.71Q15.16-0.67 15.42-0.67L15.87-0.67L15.87 0L11.25 0ZM18.9-4.30Q18.9-6.55 19.85-7.64Q20.8-8.73 22.66-8.73Q23.52-8.73 24.21-8.46Q24.9-8.2 25.38-7.64Q25.86-7.09 26.11-6.26Q26.37-5.43 26.37-4.30Q26.37-2.05 25.41-0.95Q24.45 0.16 22.61 0.16Q21.74 0.16 21.05-0.12Q20.37-0.39 19.89-0.95Q19.41-1.5 19.15-2.34Q18.9-3.18 18.9-4.30M20.45-4.30Q20.45-3.41 20.56-2.73Q20.68-2.05 20.94-1.60Q21.2-1.14 21.62-0.91Q22.04-0.67 22.64-0.67Q23.24-0.67 23.66-0.91Q24.07-1.14 24.33-1.60Q24.59-2.05 24.7-2.73Q24.81-3.41 24.81-4.30Q24.81-5.2 24.7-5.87Q24.58-6.54 24.32-6.99Q24.06-7.44 23.64-7.66Q23.23-7.89 22.63-7.89Q22.02-7.89 21.61-7.66Q21.2-7.44 20.94-6.99Q20.68-6.54 20.56-5.87Q20.45-5.2 20.45-4.30ZM26.73 0L26.73-0.67L26.95-0.67Q27.21-0.67 27.45-0.71Q27.69-0.74 27.87-0.85Q28.05-0.96 28.15-1.18Q28.26-1.39 28.26-1.74L28.26-6.81Q28.26-7.16 28.15-7.38Q28.05-7.59 27.87-7.71Q27.69-7.83 27.45-7.87Q27.21-7.91 26.95-7.91L26.9-7.91L26.9-8.58L29.76-8.58L29.76-1.82Q29.76-1.45 29.86-1.22Q29.97-0.99 30.14-0.87Q30.32-0.75 30.56-0.71Q30.8-0.67 31.07-0.67L31.28-0.67L31.28 0L26.73 0M28.03-11.17Q28.03-11.45 28.1-11.64Q28.17-11.83 28.3-11.95Q28.42-12.06 28.59-12.11Q28.75-12.16 28.95-12.16Q29.13-12.16 29.3-12.11Q29.46-12.06 29.58-11.95Q29.7-11.83 29.78-11.64Q29.85-11.45 29.85-11.17Q29.85-10.89 29.78-10.70Q29.7-10.52 29.58-10.40Q29.46-10.28 29.3-10.23Q29.13-10.18 28.95-10.18Q28.75-10.18 28.59-10.23Q28.42-10.28 28.3-10.40Q28.17-10.52 28.1-10.70Q28.03-10.89 28.03-11.17ZM32.16-4.27Q32.16-5.43 32.38-6.27Q32.59-7.12 33-7.66Q33.41-8.21 34.02-8.47Q34.63-8.73 35.42-8.73Q35.88-8.73 36.26-8.63Q36.63-8.53 36.93-8.34Q37.23-8.16 37.47-7.90Q37.7-7.64 37.88-7.33L37.97-7.33Q37.95-7.72 37.92-8.06Q37.91-8.36 37.89-8.65Q37.88-8.95 37.88-9.09L37.88-10.40Q37.88-10.75 37.77-10.96Q37.66-11.18 37.48-11.30Q37.3-11.41 37.07-11.45Q36.83-11.48 36.56-11.48L36.43-11.48L36.43-12.16L39.38-12.16L39.38-1.76Q39.38-1.41 39.48-1.19Q39.59-0.98 39.77-0.86Q39.95-0.74 40.18-0.71Q40.42-0.67 40.69-0.67L40.82-0.67L40.82 0L38.11 0L37.94-1.44L37.88-1.44Q37.7-1.07 37.46-0.78Q37.23-0.48 36.94-0.28Q36.64-0.07 36.27 0.04Q35.89 0.16 35.42 0.16Q34.63 0.16 34.02-0.11Q33.41-0.37 33-0.91Q32.59-1.45 32.38-2.29Q32.16-3.13 32.16-4.27M33.71-4.26Q33.71-2.55 34.17-1.71Q34.63-0.87 35.7-0.87Q36.32-0.87 36.74-1.07Q37.16-1.28 37.41-1.70Q37.66-2.13 37.77-2.77Q37.88-3.41 37.88-4.27Q37.88-5.11 37.77-5.75Q37.66-6.39 37.41-6.82Q37.16-7.26 36.73-7.48Q36.31-7.71 35.68-7.71Q35.16-7.71 34.78-7.48Q34.41-7.26 34.17-6.82Q33.93-6.38 33.82-5.74Q33.71-5.09 33.71-4.26ZM41.59-2.09Q41.59-2.58 41.89-2.88Q42.19-3.17 42.74-3.17Q42.77-2.67 42.89-2.21Q43.02-1.75 43.28-1.40Q43.54-1.05 43.94-0.84Q44.34-0.63 44.9-0.63Q45.98-0.63 46.58-1.14Q47.19-1.66 47.19-2.64Q47.19-3.08 47.06-3.41Q46.94-3.75 46.65-4.04Q46.36-4.32 45.89-4.58Q45.41-4.84 44.71-5.13Q43.97-5.44 43.41-5.79Q42.86-6.13 42.49-6.56Q42.13-6.98 41.95-7.51Q41.77-8.03 41.77-8.69Q41.77-9.38 42.03-9.91Q42.29-10.45 42.76-10.82Q43.23-11.2 43.87-11.39Q44.51-11.59 45.27-11.59Q45.98-11.59 46.54-11.44Q47.09-11.29 47.48-11.04Q47.86-10.79 48.06-10.46Q48.26-10.14 48.26-9.79Q48.26-9.27 47.92-9.01Q47.58-8.75 47-8.75Q47-9.13 46.91-9.49Q46.82-9.85 46.61-10.14Q46.4-10.42 46.05-10.60Q45.71-10.78 45.2-10.78Q44.74-10.78 44.38-10.65Q44.02-10.52 43.77-10.29Q43.52-10.05 43.38-9.71Q43.25-9.38 43.25-8.96Q43.25-8.48 43.38-8.12Q43.5-7.76 43.79-7.46Q44.09-7.17 44.56-6.91Q45.04-6.65 45.73-6.37Q46.44-6.08 46.99-5.76Q47.54-5.44 47.92-5.04Q48.3-4.65 48.51-4.16Q48.71-3.67 48.71-3.05Q48.71-2.3 48.43-1.70Q48.16-1.1 47.64-0.69Q47.13-0.27 46.4-0.06Q45.67 0.16 44.77 0.16Q43.99 0.16 43.39-0.01Q42.8-0.17 42.39-0.46Q41.99-0.76 41.79-1.18Q41.59-1.59 41.59-2.09ZM49.59-4.23Q49.59-6.47 50.52-7.60Q51.44-8.73 53.14-8.73Q53.91-8.73 54.53-8.49Q55.15-8.25 55.58-7.77Q56.01-7.29 56.24-6.57Q56.47-5.86 56.47-4.91L56.47-4.18L51.14-4.18Q51.16-3.3 51.32-2.68Q51.48-2.05 51.78-1.64Q52.08-1.23 52.52-1.04Q52.95-0.85 53.52-0.85Q53.94-0.85 54.29-0.95Q54.65-1.04 54.94-1.20Q55.23-1.35 55.45-1.55Q55.67-1.75 55.81-1.97Q55.92-1.92 56.02-1.77Q56.12-1.63 56.12-1.42Q56.12-1.18 55.95-0.90Q55.77-0.63 55.42-0.39Q55.07-0.16 54.54 0Q54.02 0.16 53.3 0.16Q52.44 0.16 51.75-0.14Q51.05-0.43 50.58-0.99Q50.1-1.55 49.85-2.37Q49.59-3.19 49.59-4.23M51.17-5.04L54.85-5.04Q54.85-5.67 54.76-6.20Q54.66-6.72 54.46-7.09Q54.26-7.47 53.93-7.67Q53.59-7.88 53.11-7.88Q52.22-7.88 51.74-7.15Q51.26-6.43 51.17-5.04ZM57 0L57-0.67L57.05-0.67Q57.32-0.67 57.56-0.71Q57.8-0.75 57.97-0.87Q58.15-0.99 58.25-1.22Q58.36-1.45 58.36-1.82L58.36-6.81Q58.36-7.16 58.25-7.38Q58.15-7.59 57.97-7.71Q57.79-7.83 57.55-7.87Q57.31-7.91 57.05-7.91L57-7.91L57-8.58L59.46-8.58L59.77-6.99L59.84-6.99Q60-7.35 60.16-7.67Q60.33-7.98 60.57-8.22Q60.8-8.46 61.16-8.60Q61.51-8.73 62.04-8.73Q62.91-8.73 63.34-8.43Q63.77-8.13 63.77-7.57Q63.77-7.32 63.68-7.11Q63.6-6.9 63.42-6.75Q63.24-6.59 62.96-6.51Q62.68-6.43 62.27-6.43Q62.27-7.09 62.09-7.39Q61.9-7.68 61.43-7.68Q61.13-7.68 60.9-7.51Q60.66-7.34 60.49-7.07Q60.31-6.79 60.19-6.43Q60.07-6.07 60-5.69Q59.92-5.31 59.89-4.94Q59.86-4.56 59.86-4.26L59.86-1.74Q59.86-1.39 59.96-1.18Q60.07-0.96 60.25-0.85Q60.43-0.74 60.67-0.71Q60.91-0.67 61.17-0.67L61.62-0.67L61.62 0L57 0ZM64.13 0L64.13-0.67L64.34-0.67Q64.61-0.67 64.85-0.71Q65.09-0.74 65.27-0.85Q65.45-0.96 65.55-1.18Q65.66-1.39 65.66-1.74L65.66-6.81Q65.66-7.16 65.55-7.38Q65.45-7.59 65.27-7.71Q65.09-7.83 64.85-7.87Q64.61-7.91 64.34-7.91L64.3-7.91L64.3-8.58L67.16-8.58L67.16-1.82Q67.16-1.45 67.26-1.22Q67.37-0.99 67.54-0.87Q67.72-0.75 67.96-0.71Q68.2-0.67 68.47-0.67L68.68-0.67L68.68 0L64.13 0M65.43-11.17Q65.43-11.45 65.5-11.64Q65.57-11.83 65.7-11.95Q65.82-12.06 65.98-12.11Q66.15-12.16 66.34-12.16Q66.53-12.16 66.7-12.11Q66.86-12.06 66.98-11.95Q67.1-11.83 67.18-11.64Q67.25-11.45 67.25-11.17Q67.25-10.89 67.18-10.70Q67.1-10.52 66.98-10.40Q66.86-10.28 66.7-10.23Q66.53-10.18 66.34-10.18Q66.15-10.18 65.98-10.23Q65.82-10.28 65.7-10.40Q65.57-10.52 65.5-10.70Q65.43-10.89 65.43-11.17ZM69.11 0L69.11-0.67L69.32-0.67Q69.59-0.67 69.83-0.71Q70.07-0.75 70.25-0.87Q70.42-0.99 70.53-1.22Q70.63-1.45 70.63-1.82L70.63-7.82L69.17-7.82L69.17-8.58L70.63-8.58L70.63-9.38Q70.63-10.09 70.83-10.64Q71.02-11.19 71.39-11.56Q71.76-11.94 72.28-12.13Q72.8-12.32 73.46-12.32Q74.09-12.32 74.52-12.24Q74.95-12.16 75.21-12.01Q75.47-11.86 75.59-11.66Q75.7-11.45 75.7-11.20Q75.7-10.98 75.61-10.82Q75.51-10.65 75.33-10.54Q75.16-10.42 74.92-10.36Q74.68-10.3 74.39-10.30Q74.39-10.55 74.34-10.78Q74.29-11.01 74.17-11.19Q74.05-11.37 73.84-11.48Q73.64-11.59 73.34-11.59Q72.99-11.59 72.76-11.45Q72.53-11.32 72.39-11.06Q72.25-10.8 72.19-10.41Q72.13-10.03 72.13-9.52L72.13-8.58L74.39-8.58L74.39-7.82L72.13-7.82L72.13-1.82Q72.13-1.45 72.24-1.22Q72.34-0.99 72.52-0.87Q72.7-0.75 72.94-0.71Q73.18-0.67 73.45-0.67L74.05-0.67L74.05 0L69.11 0Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "DroidSerif", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "DroidSerif-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "DroidSerif-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "DroidSerif-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
firaSans: { | |
id: "firaSans", | |
name: "Fira Sans", | |
preview: "<path d='M7.36-9.81L7.54-11.02L1.68-11.02L1.68 0L3.2 0L3.2-4.85L6.8-4.85L6.8-6.05L3.2-6.05L3.2-9.81ZM11.2-11.36C11.2-11.92 10.77-12.35 10.16-12.35C9.55-12.35 9.14-11.92 9.14-11.36C9.14-10.78 9.55-10.35 10.16-10.35C10.77-10.35 11.2-10.78 11.2-11.36ZM10.9 0L10.9-8.43L9.42-8.43L9.42 0ZM15.44 0L15.44-4.94C15.73-6.11 16.4-7.18 17.46-7.18C17.76-7.18 17.94-7.15 18.19-7.09L18.46-8.53C18.21-8.59 17.9-8.62 17.63-8.62C16.64-8.62 15.9-8 15.42-6.82L15.25-8.43L13.97-8.43L13.97 0ZM25.63-5.87C25.63-7.58 24.7-8.62 22.56-8.62C21.73-8.62 20.78-8.46 19.74-8.08L20.13-6.99C20.99-7.3 21.78-7.42 22.34-7.42C23.57-7.42 24.16-6.98 24.16-5.79L24.16-5.14L23.07-5.14C20.51-5.14 19.1-4.16 19.1-2.42C19.1-0.85 20.14 0.19 21.84 0.19C22.86 0.19 23.76-0.19 24.35-0.99C24.61-0.24 25.15 0.1 25.9 0.19L26.26-0.83C25.82-0.99 25.63-1.23 25.63-1.9ZM22.24-0.91C21.18-0.91 20.72-1.44 20.72-2.48C20.72-3.5 21.34-4.16 23.15-4.16L24.16-4.16L24.16-2.08C23.68-1.34 23.04-0.91 22.24-0.91ZM39.47-3.07C39.47-5.18 37.97-5.87 36.21-6.42C34.22-7.02 33.79-7.47 33.79-8.4C33.79-9.46 34.67-9.97 35.78-9.97C36.7-9.97 37.49-9.68 38.26-8.98L39.12-9.94C38.22-10.77 37.25-11.22 35.71-11.22C33.65-11.22 32.24-10.03 32.24-8.34C32.24-6.62 33.36-5.81 35.5-5.15C37.36-4.58 37.89-4.06 37.89-3.02C37.89-1.7 36.82-1.06 35.52-1.06C34.32-1.06 33.42-1.49 32.67-2.21L31.79-1.23C32.7-0.34 33.95 0.19 35.57 0.19C38.02 0.19 39.47-1.15 39.47-3.07ZM47.33-5.87C47.33-7.58 46.4-8.62 44.26-8.62C43.42-8.62 42.48-8.46 41.44-8.08L41.82-6.99C42.69-7.3 43.47-7.42 44.03-7.42C45.26-7.42 45.86-6.98 45.86-5.79L45.86-5.14L44.77-5.14C42.21-5.14 40.8-4.16 40.8-2.42C40.8-0.85 41.84 0.19 43.54 0.19C44.56 0.19 45.46-0.19 46.05-0.99C46.3-0.24 46.85 0.1 47.6 0.19L47.95-0.83C47.52-0.99 47.33-1.23 47.33-1.9ZM43.94-0.91C42.88-0.91 42.42-1.44 42.42-2.48C42.42-3.5 43.04-4.16 44.85-4.16L45.86-4.16L45.86-2.08C45.38-1.34 44.74-0.91 43.94-0.91ZM51.86-6.11C52.3-6.77 53.04-7.47 53.95-7.47C54.91-7.47 55.26-7.04 55.26-6.03L55.26 0L56.74 0L56.74-6.13C56.74-7.7 56.08-8.62 54.45-8.62C53.46-8.62 52.45-8.14 51.76-7.28L51.65-8.43L50.38-8.43L50.38 0L51.86 0ZM61.81-0.99C60.91-0.99 60.13-1.3 59.47-1.84L58.66-0.91C59.39-0.27 60.42 0.19 61.84 0.19C63.52 0.19 65.17-0.58 65.17-2.38C65.17-4.02 63.98-4.56 62.5-4.98C61.07-5.36 60.54-5.63 60.54-6.35C60.54-7.02 61.2-7.46 62.11-7.46C63.01-7.46 63.63-7.2 64.24-6.78L64.9-7.78C64.21-8.27 63.33-8.62 62.18-8.62C60.4-8.62 59.02-7.68 59.02-6.26C59.02-4.88 60-4.22 61.52-3.84C63.18-3.42 63.58-3.1 63.58-2.27C63.58-1.49 62.88-0.99 61.81-0.99Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "FiraSansOT-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "FiraSansOT-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "FiraSansOT-RegularItalic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "FiraSansOT-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
openDyslexic: { | |
id: "openDyslexic", | |
name: "OpenDyslexic", | |
preview: "<path d='M6.58-11.87C9.86-11.87 11.97-9.5 11.97-5.82C11.97-2.14 9.86 0.22 6.58 0.22C3.3 0.22 1.17-2.13 1.17-5.82C1.17-9.5 3.3-11.87 6.58-11.87ZM6.58-10.59C4.29-10.59 2.83-8.77 2.83-5.82C2.83-3.41 4.29-2.77 6.58-2.77C8.86-2.77 10.3-3.41 10.3-5.82C10.3-8.77 8.86-10.59 6.58-10.59ZM16.14 3.33L14.3 3.33L15.01-2.03L15.01-8.62L16.45-8.62L16.21-7.42C16.8-8.46 17.73-8.96 19.01-8.96C21.14-8.96 22.59-7.12 22.59-4.37C22.59-1.62 21.14 0.22 19.01 0.22C17.73 0.22 16.8-0.27 16.21-1.31ZM21.66-4.62C21.66-6.74 20.75-8 19.22-8C17.7-8 16.78-6.74 16.78-4.62C16.78-2.5 17.78-2.14 19.3-2.14C20.82-2.14 21.66-2.5 21.66-4.62ZM32.58-4.74L26.05-4.74C26.08-2.4 27.23-2 29.14-1.9C30.24-1.9 31.28-1.89 32.3-2.43L32.34-0.45C31.3 0 30.21 0.22 29.09 0.22C26.3 0.13 24.54-1.52 24.54-4.29C24.66-7.15 26.21-8.96 28.85-8.96C31.18-8.86 32.38-7.78 32.58-5.28ZM31.33-6C31.17-6.98 30.27-8.21 28.85-8.21C27.25-8.21 26.21-7.04 26.21-5.98ZM42.19 0L40.14 0L40.45-5.31C40.45-6.98 39.95-7.79 38.67-7.79C36.91-7.79 36.08-6.74 36.08-5.02L36.32 0L34.32 0L34.56-8.83L36-8.83L36-7.78C36.69-8.32 37.62-8.96 38.83-8.96C40.83-8.96 41.86-7.7 41.97-5.28ZM44.19 0L44.19-11.66L47.44-11.66C51.97-11.66 54-9.84 54-5.84C54-1.82 51.94 0 47.44 0ZM45.86-10.37L45.86-2.94L47.76-2.94C50.98-2.94 52.14-3.62 52.38-6C52.38-8.91 50.98-10.37 47.76-10.37ZM62.26-8.75L63.78-8.75L60.1 0.82C59.07 3.1 58.34 3.49 57.06 3.49L55.74 3.49L55.74 1.58L56.75 1.58C57.54 1.58 57.86 1.18 58.4 0.51L59.01-0.72L55.26-8.75L56.78-8.75L59.89-3.66ZM71.57-7.3C70.75-7.7 69.87-7.92 68.94-7.92C67.5-7.92 66.72-7.39 66.72-6.53C66.72-5.74 67.18-5.38 68.72-5.04L69.22-4.93C71.25-4.5 72.03-3.84 72.03-2.42C72.03-0.78 70.67 0.22 68.42 0.22C67.49 0.22 66.48 0.05 65.34-0.32L65.34-2.43C66.42-1.87 67.44-1.6 68.45-1.6C69.81-1.6 70.4-2.02 70.4-2.77C70.22-3.09 70.08-3.31 69.95-3.46C69.84-3.6 69.33-3.76 68.43-3.97L67.94-4.08C66.16-4.45 65.41-5.02 65.41-6.38C65.41-8.03 66.62-8.96 68.77-8.96C69.84-8.96 70.78-8.8 71.57-8.5ZM77.5 0L74.37 0C74.43-4.05 74.54-7.39 74.77-11.46L76.13-11.46C75.94-8 75.84-5.25 75.81-1.78L77.5-1.78ZM87.87-4.74L81.34-4.74C81.38-2.4 82.53-2 84.43-1.9C85.54-1.9 86.58-1.89 87.6-2.43L87.63-0.45C86.59 0 85.5 0.22 84.38 0.22C81.6 0.13 79.84-1.52 79.84-4.29C79.95-7.15 81.5-8.96 84.14-8.96C86.48-8.86 87.68-7.78 87.87-5.28ZM86.62-6C86.46-6.98 85.57-8.21 84.14-8.21C82.54-8.21 81.5-7.04 81.5-5.98ZM93.81-5.17L96.45-8.75L97.9-8.75L94.82-4.1L98.22 0L95.9 0L93.9-3.04L91.74 0L89.42 0L92.91-4.19L89.87-8.75L91.41-8.75ZM102.16-10.34L100.72-10.34L100.8-12.16L102.08-12.16ZM100.56 0C100.77-3.07 100.82-6 100.8-8.75L102.08-8.75C101.98-6.13 102.06-3.18 102.4 0ZM111.66-7.15C110.85-7.6 110.03-7.82 109.2-7.82C107.33-7.82 106.34-6.5 106.34-4.37C106.48-2.86 107.26-2.35 109.14-2.26C109.97-2.26 110.82-2.14 111.63-2.59L111.66-0.34C110.86 0.03 110.02 0.22 109.04 0.22C106.42 0.22 104.74-1.55 104.74-4.37C104.74-7.22 106.42-8.96 109.14-8.96C110.02-8.96 110.88-8.78 111.66-8.42Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "OpenDyslexic-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "OpenDyslexic-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "OpenDyslexic-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "OpenDyslexic-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
sourceSans: { | |
id: "sourceSans", | |
name: "Source Sans Pro", | |
preview: "<path d='M0.67-1.36C1.58-0.42 2.88 0.19 4.35 0.19C6.56 0.19 7.92-1.14 7.92-2.8C7.92-4.35 6.98-5.07 5.76-5.6L4.27-6.24C3.44-6.59 2.53-6.98 2.53-7.98C2.53-8.93 3.31-9.52 4.48-9.52C5.46-9.52 6.22-9.14 6.86-8.53L7.58-9.39C6.83-10.16 5.73-10.69 4.48-10.69C2.58-10.69 1.18-9.5 1.18-7.9C1.18-6.37 2.32-5.62 3.31-5.2L4.82-4.54C5.81-4.1 6.56-3.76 6.56-2.69C6.56-1.66 5.74-0.98 4.37-0.98C3.28-0.98 2.22-1.5 1.47-2.29ZM9.28-3.87C9.28-1.3 10.98 0.19 12.88 0.19C14.78 0.19 16.48-1.3 16.48-3.87C16.48-6.48 14.78-7.97 12.88-7.97C10.98-7.97 9.28-6.48 9.28-3.87ZM10.64-3.87C10.64-5.66 11.55-6.88 12.88-6.88C14.22-6.88 15.12-5.66 15.12-3.87C15.12-2.1 14.22-0.9 12.88-0.9C11.55-0.9 10.64-2.1 10.64-3.87ZM18.42-2.85C18.42-0.86 19.15 0.19 20.8 0.19C21.87 0.19 22.64-0.37 23.36-1.22L23.41-1.22L23.52 0L24.61 0L24.61-7.78L23.3-7.78L23.3-2.26C22.56-1.34 22-0.94 21.2-0.94C20.18-0.94 19.74-1.57 19.74-3.02L19.74-7.78L18.42-7.78ZM27.23 0L28.54 0L28.54-4.99C29.07-6.3 29.86-6.78 30.51-6.78C30.83-6.78 31.01-6.74 31.26-6.66L31.52-7.81C31.26-7.92 31.02-7.97 30.69-7.97C29.81-7.97 29.01-7.34 28.48-6.37L28.43-6.37L28.32-7.78L27.23-7.78ZM32.05-3.87C32.05-1.3 33.63 0.19 35.7 0.19C36.62 0.19 37.52-0.19 38.22-0.82L37.63-1.68C37.17-1.26 36.54-0.9 35.81-0.9C34.38-0.9 33.41-2.1 33.41-3.87C33.41-5.66 34.43-6.88 35.84-6.88C36.46-6.88 36.94-6.59 37.41-6.19L38.06-7.04C37.54-7.54 36.82-7.97 35.79-7.97C33.79-7.97 32.05-6.48 32.05-3.87ZM39.01-3.87C39.01-1.33 40.66 0.19 42.74 0.19C43.79 0.19 44.62-0.18 45.3-0.61L44.83-1.47C44.26-1.1 43.63-0.86 42.9-0.86C41.41-0.86 40.4-1.92 40.3-3.6L45.55-3.6C45.58-3.79 45.6-4.05 45.6-4.32C45.6-6.54 44.48-7.97 42.5-7.97C40.72-7.97 39.01-6.42 39.01-3.87ZM40.29-4.46C40.45-6.03 41.44-6.93 42.53-6.93C43.74-6.93 44.45-6.05 44.45-4.46ZM50.11-1.36C51.02-0.42 52.32 0.19 53.79 0.19C56 0.19 57.36-1.14 57.36-2.8C57.36-4.35 56.42-5.07 55.2-5.6L53.71-6.24C52.88-6.59 51.97-6.98 51.97-7.98C51.97-8.93 52.75-9.52 53.92-9.52C54.9-9.52 55.66-9.14 56.3-8.53L57.02-9.39C56.27-10.16 55.17-10.69 53.92-10.69C52.02-10.69 50.62-9.5 50.62-7.9C50.62-6.37 51.76-5.62 52.75-5.2L54.26-4.54C55.25-4.1 56-3.76 56-2.69C56-1.66 55.18-0.98 53.81-0.98C52.72-0.98 51.66-1.5 50.91-2.29ZM58.91-2.02C58.91-0.62 59.89 0.19 61.2 0.19C62.16 0.19 63.02-0.32 63.78-0.93L63.81-0.93L63.92 0L65.01 0L65.01-4.77C65.01-6.7 64.21-7.97 62.3-7.97C61.06-7.97 59.97-7.42 59.25-6.96L59.78-6.05C60.38-6.46 61.18-6.88 62.1-6.88C63.36-6.88 63.7-5.92 63.7-4.93C60.38-4.56 58.91-3.71 58.91-2.02ZM60.21-2.11C60.21-3.1 61.09-3.74 63.7-4.06L63.7-1.9C62.94-1.23 62.32-0.86 61.57-0.86C60.8-0.86 60.21-1.23 60.21-2.11ZM67.49 0L68.8 0L68.8-5.63C69.58-6.42 70.13-6.83 70.93-6.83C71.95-6.83 72.4-6.21 72.4-4.75L72.4 0L73.71 0L73.71-4.93C73.71-6.91 72.98-7.97 71.34-7.97C70.27-7.97 69.47-7.39 68.74-6.66L68.69-6.66L68.58-7.78L67.49-7.78ZM75.38-0.88C76.11-0.27 77.17 0.19 78.27 0.19C80.11 0.19 81.12-0.86 81.12-2.13C81.12-3.6 79.87-4.06 78.75-4.48C77.87-4.82 77.02-5.09 77.02-5.82C77.02-6.42 77.47-6.94 78.45-6.94C79.14-6.94 79.7-6.66 80.22-6.26L80.85-7.09C80.26-7.57 79.41-7.97 78.43-7.97C76.75-7.97 75.76-7.01 75.76-5.76C75.76-4.45 76.98-3.92 78.08-3.52C78.93-3.2 79.86-2.85 79.86-2.05C79.86-1.38 79.34-0.83 78.32-0.83C77.39-0.83 76.7-1.22 76.03-1.76ZM86.3 0L87.63 0L87.63-4.16L89.52-4.16C91.82-4.16 93.39-5.2 93.39-7.41C93.39-9.71 91.84-10.5 89.52-10.5L86.3-10.5ZM87.63-5.25L87.63-9.42L89.36-9.42C91.17-9.42 92.06-8.93 92.06-7.41C92.06-5.92 91.18-5.25 89.36-5.25ZM95.39 0L96.7 0L96.7-4.99C97.23-6.3 98.02-6.78 98.67-6.78C98.99-6.78 99.17-6.74 99.42-6.66L99.68-7.81C99.42-7.92 99.18-7.97 98.85-7.97C97.97-7.97 97.17-7.34 96.64-6.37L96.59-6.37L96.48-7.78L95.39-7.78ZM100.21-3.87C100.21-1.3 101.9 0.19 103.81 0.19C105.71 0.19 107.41-1.3 107.41-3.87C107.41-6.48 105.71-7.97 103.81-7.97C101.9-7.97 100.21-6.48 100.21-3.87ZM101.57-3.87C101.57-5.66 102.48-6.88 103.81-6.88C105.15-6.88 106.05-5.66 106.05-3.87C106.05-2.1 105.15-0.9 103.81-0.9C102.48-0.9 101.57-2.1 101.57-3.87Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "SourceSansPro-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "SourceSansPro-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "SourceSansPro-It", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "SourceSansPro-BoldIt", | |
weight: 700 | |
}] | |
}, | |
vollkorn: { | |
id: "vollkorn", | |
name: "Vollkorn", | |
preview: "<path d='M8.94-10.82C8.45-10.82 8.05-10.83 7.58-10.86C7.58-10.69 7.6-10.42 7.66-10.18C8.67-10.06 8.77-9.41 8.37-8.22C7.68-6.18 6.98-4.24 6.18-2.27C5.31-4.45 4.46-6.45 3.6-8.43C2.98-9.87 3.17-10.11 4.19-10.18C4.24-10.4 4.27-10.67 4.27-10.86C3.66-10.83 3.01-10.82 2.34-10.82C1.66-10.82 0.82-10.83 0.4-10.86C0.4-10.69 0.42-10.43 0.48-10.18C1.07-10.11 1.18-9.9 1.89-8.34C2.9-6.11 4.19-3.01 5.44 0.1C5.7 0.1 5.86 0.08 6.06 0.03C7.14-2.75 8.16-5.54 9.15-8.29C9.54-9.34 9.84-10.02 10.5-10.18C10.56-10.42 10.58-10.62 10.58-10.86C10.11-10.83 9.44-10.82 8.94-10.82ZM13.71-7.47C11.58-7.47 10.1-5.84 10.1-3.66C10.1-1.36 11.52 0.14 13.71 0.14C15.87 0.14 17.33-1.47 17.33-3.66C17.33-5.94 15.98-7.47 13.71-7.47ZM13.55-6.7C14.74-6.7 15.73-5.46 15.73-3.47C15.73-1.79 15.12-0.62 13.84-0.62C12.54-0.62 11.71-1.84 11.71-4C11.71-5.6 12.32-6.7 13.55-6.7ZM19.57-2.03C19.57-0.96 19.31-0.64 18.46-0.64C18.4-0.43 18.38-0.16 18.38 0.05C18.91 0.02 19.62 0 20.22 0C20.83 0 21.47 0.02 22.03 0.05C22.03-0.1 22.02-0.42 21.95-0.64C21.26-0.64 21.01-0.96 21.01-2.03L21.01-10.83C21.01-11.23 20.85-11.41 20.66-11.47C20.27-11.2 18.99-10.93 18.51-10.93C18.4-10.75 18.37-10.58 18.37-10.34C19.46-10.34 19.57-9.95 19.57-9.2ZM24.35-2.03C24.35-0.96 24.1-0.64 23.25-0.64C23.18-0.43 23.17-0.16 23.17 0.05C23.7 0.02 24.4 0 25.01 0C25.62 0 26.26 0.02 26.82 0.05C26.82-0.1 26.8-0.42 26.74-0.64C26.05-0.64 25.79-0.96 25.79-2.03L25.79-10.83C25.79-11.23 25.63-11.41 25.44-11.47C25.06-11.2 23.78-10.93 23.3-10.93C23.18-10.75 23.15-10.58 23.15-10.34C24.24-10.34 24.35-9.95 24.35-9.2ZM34.11-1.7C33.14-2.93 32.48-3.73 31.82-4.45L33.22-5.71C34.02-6.45 34.54-6.67 35.17-6.69C35.25-6.88 35.28-7.15 35.28-7.36C34.7-7.33 34.13-7.33 33.78-7.33C33.34-7.33 32.8-7.33 32.11-7.36C32.11-7.12 32.14-6.91 32.21-6.7C32.5-6.7 32.67-6.62 32.67-6.45C32.67-6.22 32.37-5.82 31.65-5.17L30.58-4.19L30.58-10.83C30.58-11.23 30.42-11.41 30.22-11.47C29.84-11.2 28.56-10.93 28.08-10.93C27.97-10.75 27.94-10.58 27.94-10.34C29.02-10.34 29.14-9.95 29.14-9.2L29.14-2.03C29.14-0.96 28.88-0.64 28.03-0.64C27.97-0.43 27.95-0.16 27.95 0.05C28.48 0.02 29.18 0 29.79 0C30.4 0 31.04 0.02 31.6 0.05C31.6-0.1 31.58-0.42 31.52-0.64C30.83-0.64 30.58-0.96 30.58-2.03L30.58-3.73C31.65-2.59 33.14-0.67 33.65 0.14C34.35 0.03 34.93 0 35.7 0C35.76-0.18 35.78-0.38 35.78-0.69C35.04-0.72 34.85-0.78 34.11-1.7ZM40.11-7.47C37.98-7.47 36.5-5.84 36.5-3.66C36.5-1.36 37.92 0.14 40.11 0.14C42.27 0.14 43.73-1.47 43.73-3.66C43.73-5.94 42.38-7.47 40.11-7.47ZM39.95-6.7C41.14-6.7 42.13-5.46 42.13-3.47C42.13-1.79 41.52-0.62 40.24-0.62C38.94-0.62 38.11-1.84 38.11-4C38.11-5.6 38.72-6.7 39.95-6.7ZM49.65-7.33C48.82-7.33 48.18-6.77 47.71-6.03C47.58-5.84 47.5-5.57 47.38-5.2C47.47-5.68 47.58-6.16 47.58-6.77C47.58-7.23 47.42-7.41 47.23-7.47C46.74-7.22 45.74-6.98 45.09-6.93C44.98-6.75 44.94-6.58 44.94-6.34C46-6.3 46.14-5.95 46.14-5.2L46.14-2.03C46.14-0.96 45.89-0.69 45.04-0.64C44.98-0.46 44.96-0.24 44.96 0.05C45.38 0.02 46.32 0 47.07 0C47.82 0 48.59 0.02 49.09 0.05C49.09-0.24 49.07-0.46 49.01-0.64C48-0.69 47.58-0.96 47.58-2.35L47.58-3.89C47.58-5.14 48.38-6.16 48.94-6.16C49.36-6.16 49.68-5.94 49.73-4.91C50.08-4.91 50.45-4.99 50.64-5.06C50.64-5.62 50.67-6.42 50.75-6.94C50.42-7.2 50.08-7.33 49.65-7.33ZM59.97-0.64C59.33-0.64 59.02-0.93 59.02-2.03L59.02-4.78C59.02-6.74 57.95-7.39 56.74-7.39C55.6-7.39 54.77-6.74 54.42-6.24C54.29-6.06 54.24-5.94 54.18-5.82C54.27-6.19 54.29-6.51 54.29-6.77C54.29-7.23 54.13-7.41 53.94-7.47C53.44-7.22 52.45-6.98 51.79-6.93C51.68-6.75 51.65-6.58 51.65-6.34C52.7-6.3 52.85-5.95 52.85-5.2L52.85-2.03C52.85-0.96 52.58-0.64 51.74-0.64C51.68-0.46 51.66-0.24 51.66 0.05C52.13 0.02 52.91 0 53.57 0C54.22 0 55.02 0.03 55.47 0.05C55.47-0.24 55.46-0.45 55.39-0.64C54.56-0.64 54.29-0.96 54.29-2.03L54.29-3.74C54.29-5.7 55.26-6.42 56.1-6.42C56.96-6.42 57.58-5.97 57.58-4.46L57.58-2.03C57.58-0.96 57.25-0.64 56.48-0.64C56.42-0.46 56.4-0.24 56.4 0.05C56.9 0.03 57.65 0 58.3 0C58.96 0 59.58 0.02 60.05 0.05C60.05-0.24 60.03-0.45 59.97-0.64Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "Vollkorn-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "Vollkorn-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "Vollkorn-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "Vollkorn-BoldItalic", | |
weight: 700 | |
}] | |
} | |
}, | |
DEFAULTS: { | |
fontSize: "fs_8", | |
fontFamily: "default", | |
textAlign: "default", | |
lineHeight: "default", | |
backgroundMode: "bgwhite", | |
readingMode: "paged" | |
}, | |
EMBEDDING: { | |
NONE: 1, | |
LIMIT_TOTAL: 2, | |
LIMIT_SINGLE: 3 | |
}, | |
MAX_FILESIZE: 2e6 | |
} | |
}, | |
RESELLER: { | |
1: "tolinode", | |
3: "thaliade", | |
4: "thaliaat", | |
5: "thaliach", | |
6: "buchde", | |
7: "buchch", | |
8: "orellfuesslich", | |
10: "weltbildde", | |
11: "weltbildat", | |
12: "weltbildch", | |
13: "hugendubelde", | |
20: "bertelsmannde", | |
21: "ottode", | |
22: "donaulandat", | |
23: "osianderde", | |
24: "mayerschede", | |
30: "buecherde", | |
40: "bildde", | |
60: "boekhandelbe", | |
61: "clubbe", | |
80: "libride", | |
81: "ebookde", | |
82: "librisnl", | |
90: "ibsit", | |
91: "libraccioit", | |
92: "indiebookit" | |
}, | |
SYSTEM: { | |
MAX_WORKER: 4, | |
FIXED_LOCAL_HEADER_LENGTH: 30 | |
}, | |
THEMES: { | |
DEFAULT_THEME: "tolinode", | |
AVAILABLE: ["tolinode"], | |
RESELLER_DEFAULT_THEME: { | |
1: "tolinode" | |
} | |
}, | |
ENTITLEMENT_TYPES: { | |
AUDIOBOOK: "AUDIOBOOK", | |
EBOOK: "EBOOK", | |
EDATA: "EDATA", | |
EMAGAZINE: "EMAGAZINE", | |
EPAPER: "EPAPER" | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/Metadata.js": function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
n("./musketeer/modules/tolino-shared/globals.js"), | |
n("./musketeer/modules/tolino-shared/services/Reseller.js") | |
} | |
).call(this, n("./node_modules/webpack/buildin/global.js")) | |
}, | |
"./musketeer/modules/tolino-shared/services/Reseller.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return i | |
} | |
)); | |
var r = n("./musketeer/modules/tolino-shared/globals.js"); | |
function o(e) { | |
const t = e && e.resellerCountryResponse && e.resellerCountryResponse.resellerCountryGroups; | |
let n = {}; | |
if (t) | |
for (let e in t) | |
n[t[e].languageCode] = t[e].resellerCountries; | |
return n | |
} | |
class i { | |
async fetchCountries() { | |
return async function(e) { | |
const t = { | |
Accept: "application/json", | |
"Content-Type": "application/json" | |
} | |
, n = r.a.NET.RESELLER_GROUP | |
, i = r.a.NET.BACKEND_BASE_URL + "reseller/countries?resellerGroup=" + n; | |
let s; | |
try { | |
s = await fetch(i, { | |
method: "GET", | |
headers: t | |
}) | |
} catch (e) { | |
console.log(e) | |
} | |
if (s && s.ok) | |
return s.json().then(o); | |
throw s | |
}() | |
} | |
async fetchResellers() { | |
return async function(e) {}() | |
} | |
async fetchConfig() { | |
return async function(e) {}() | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/URLManager.js": function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
n.d(t, "c", (function() { | |
return c | |
} | |
)), | |
n.d(t, "d", (function() { | |
return l | |
} | |
)), | |
n.d(t, "a", (function() { | |
return f | |
} | |
)), | |
n.d(t, "b", (function() { | |
return d | |
} | |
)); | |
n("./node_modules/core-js/modules/web.url.js"); | |
const r = "object" == typeof window && (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder) || null | |
, o = "object" == typeof window && (window.URL || window.webkitURL) || "object" == typeof e && e.URL || null | |
, i = "object" == typeof window && window.Blob || "object" == typeof e && e.Blob || null | |
, s = null !== o && (null !== i || null !== r) | |
, u = {}; | |
function a(e, t) { | |
if ("[object Blob]" === Object.prototype.toString.call(e)) | |
return e; | |
try { | |
return new i([e],{ | |
type: t | |
}) | |
} catch (o) { | |
if ("InvalidStateError" === o.name) | |
return new i([e.buffer],{ | |
type: t | |
}); | |
if ("TypeError" === o.name && r) { | |
var n = new r; | |
return n.append([e.buffer]), | |
n.getBlob(t) | |
} | |
return null | |
} | |
} | |
function c(e) { | |
for (var t in u) | |
if (u[t] === e) | |
return t; | |
return null | |
} | |
function l(e) { | |
return e && null !== c(e) | |
} | |
function f(e, t, n) { | |
if (!s) | |
return u[e] = e, | |
u[e]; | |
if (e in u) | |
return u[e]; | |
var r = a(t, n); | |
return r ? u[e] = o.createObjectURL(r) : (console.warn("Can't create Blob from data " + e), | |
null) | |
} | |
function d(e, t, n) { | |
if (!s) | |
return Promise.resolve(null); | |
if (e in u) | |
return Promise.resolve(u[e]); | |
var r = a(t, n); | |
if (!r) | |
return console.warn("Can't create Blob from data " + e), | |
Promise.resolve(null); | |
var i = o.createObjectURL(r); | |
return u[e] = i, | |
Promise.resolve(i) | |
} | |
} | |
).call(this, n("./node_modules/webpack/buildin/global.js")) | |
}, | |
"./musketeer/modules/tolino-shared/services/zip/zip.worker.js": function(e, t, n) { | |
e.exports = function() { | |
return new Worker(n.p + "zip.worker.js") | |
} | |
}, | |
"./node_modules/babel-loader/lib/index.js!./musketeer/modules/tolino-cloud/bookshelf.worker.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
var r = {}; | |
n.r(r), | |
n.d(r, "getTime", (function() { | |
return te | |
} | |
)), | |
n.d(r, "setTime", (function() { | |
return ne | |
} | |
)); | |
n("./node_modules/core-js/modules/es.string.replace.js"); | |
n("./node_modules/core-js/modules/es.array.reduce.js"); | |
n("./node_modules/sha1/sha1.js"); | |
n("./musketeer/modules/tolino-shared/services/URLManager.js"); | |
var o = n("./musketeer/modules/tolino-shared/globals.js"); | |
const i = { | |
Regular: "normal", | |
Reg: "normal", | |
Rg: "normal", | |
Book: "normal", | |
Roman: "normal", | |
Light: "light", | |
Lt: "light", | |
Thin: "thin", | |
Hairline: "thin", | |
Medium: "medium", | |
Med: "medium", | |
Semibold: "semibold", | |
Smbd: "semibold", | |
Demibold: "semibold", | |
Bold: "bold", | |
Bld: "bold", | |
Bd: "bold", | |
Black: "black", | |
Blk: "black", | |
Heavy: "black", | |
Extralight: "extralight", | |
Ultralight: "extralight", | |
Extrabold: "extrabold", | |
Ultrabold: "extrabold", | |
Ultra: "extrabold" | |
} | |
, s = { | |
Italic: "italic", | |
Ital: "italic", | |
It: "italic", | |
Cursive: "italic", | |
Oblique: "oblique", | |
Obl: "oblique" | |
} | |
, u = Object.keys(i).join("|") | |
, a = Object.keys(s).join("|"); | |
new RegExp("(.+?)[-_ ]?(" + u + ")?[-_ ]?(" + a + ")?$"), | |
new RegExp("(.+?)[-_ ](" + u + ")?[-_ ]?(" + a + ")?$","i"); | |
const c = { | |
UNKNOWN_RULE: 0, | |
STYLE_RULE: 1, | |
CHARSET_RULE: 2, | |
IMPORT_RULE: 3, | |
MEDIA_RULE: 4, | |
FONT_FACE_RULE: 5, | |
PAGE_RULE: 6, | |
KEYFRAMES_RULE: 7, | |
KEYFRAME_RULE: 8, | |
MOZ_KEYFRAMES_RULE: 7, | |
MOZ_KEYFRAME_RULE: 8, | |
WEBKIT_KEYFRAMES_RULE: 7, | |
WEBKIT_KEYFRAME_RULE: 8, | |
NAMESPACE_RULE: 10 | |
} | |
, l = { | |
"@charset": c.CHARSET_RULE, | |
"@import": c.IMPORT_RULE, | |
"@media": c.MEDIA_RULE, | |
"@font-face": c.FONT_FACE_RULE, | |
"@page": c.PAGE_RULE, | |
"@keyframes": c.KEYFRAMES_RULE, | |
"@keyframe": c.KEYFRAME_RULE, | |
"@-moz-keyframes": c.MOZ_KEYFRAMES_RULE, | |
"@-moz-keyframe": c.MOZ_KEYFRAME_RULE, | |
"@-webkit-keyframes": c.WEBKIT_KEYFRAMES_RULE, | |
"@-webkit-keyframe": c.WEBKIT_KEYFRAME_RULE, | |
"@namespace": c.NAMESPACE_RULE | |
} | |
, f = {}; | |
f[c.UNKNOWN_RULE] = "", | |
f[c.STYLE_RULE] = "", | |
f[c.CHARSET_RULE] = "@charset", | |
f[c.IMPORT_RULE] = "@import", | |
f[c.MEDIA_RULE] = "@media", | |
f[c.FONT_FACE_RULE] = "@font-face", | |
f[c.PAGE_RULE] = "@page", | |
f[c.KEYFRAMES_RULE] = "@keyframes", | |
f[c.KEYFRAME_RULE] = "@keyframe", | |
f[c.NAMESPACE_RULE] = "@namespace"; | |
const d = {}; | |
d[c.STYLE_RULE] = !0, | |
d[c.FONT_FACE_RULE] = !0, | |
d[c.PAGE_RULE] = !0, | |
d[c.KEYFRAMES_RULE] = !0, | |
d[c.KEYFRAME_RULE] = !0; | |
const h = {}; | |
h[c.STYLE_RULE] = !0, | |
h[c.MEDIA_RULE] = !0, | |
h[c.FONT_FACE_RULE] = !0, | |
h[c.PAGE_RULE] = !0, | |
h[c.KEYFRAMES_RULE] = !0, | |
h[c.KEYFRAME_RULE] = !0; | |
const p = { | |
",": !0, | |
"=": !0, | |
"!": !0, | |
"/": !0, | |
"(": !0, | |
" ": !0 | |
} | |
, v = { | |
",": !0, | |
"=": !0, | |
"/": !0, | |
"(": !0, | |
")": !0, | |
" ": !0 | |
} | |
, _ = { | |
cssRules: !0, | |
declarations: !0, | |
descriptors: !0, | |
mSelectorText: !0, | |
parsedCssText: !0, | |
type: !0 | |
}; | |
function g(e, t) { | |
var n = e.slice(-1) | |
, r = t.charAt(0); | |
return p[n] || v[r] ? e + t : e + " " + t | |
} | |
function j(e) { | |
return e && e.parsedCssText | |
} | |
function m(e) { | |
return e && e.cssText() | |
} | |
function y() {} | |
function b(e, t, n) { | |
this.type = e || c.UNKNOWN_RULE, | |
this.mSelectorText = t || "", | |
this.parsedCssText = n || "", | |
d[e] && (this.descriptors = this.declarations = []) | |
} | |
function E(e, t) { | |
var n = t && t.reduce(g) || ""; | |
this.property = e, | |
this.values = t, | |
this.valueText = n, | |
this.parsedCssText = e + ": " + n | |
} | |
y.prototype.cssText = function() { | |
return this.descriptors ? this.descriptors.map(m).join("\n") : "" | |
} | |
, | |
b.prototype.STYLE_RULE = c.STYLE_RULE, | |
b.prototype.IMPORT_RULE = c.IMPORT_RULE, | |
b.prototype.MEDIA_RULE = c.MEDIA_RULE, | |
b.prototype.FONT_FACE_RULE = c.FONT_FACE_RULE, | |
b.prototype.selectorText = function() { | |
return this.mSelectorText | |
} | |
, | |
b.prototype.setSelector = function(e) { | |
this.mSelectorText = e | |
} | |
, | |
b.prototype.cssText = function() { | |
return f[this.type] + (this.mSelectorText ? " " + this.mSelectorText : "") + (h[this.type] ? " { " + (this.descriptors ? this.descriptors.map(m).join("; ") : "") + " }" : ";") | |
} | |
, | |
b.prototype.replace = function(e) { | |
var t = e.cssRules ? e.cssRules[0] : e; | |
for (var n in t) | |
_[n] && (this[n] = t[n]) | |
} | |
, | |
E.prototype.cssText = function() { | |
return this.property && this.values ? this.property + ": " + this.values.reduce(g) : "" | |
} | |
; | |
class w { | |
constructor() { | |
this.parseTree, | |
this.rule, | |
this.ruleSet, | |
this.ruleSetStack = [], | |
this.Declaration = E | |
} | |
static get ruleType() { | |
return c | |
} | |
_addRule() { | |
this.ruleSet || (this.ruleSet = new y), | |
this.ruleSet.cssRules || (this.ruleSet.descriptors = this.ruleSet.cssRules = []), | |
this.ruleSet.cssRules.push(this.rule), | |
this.rule = null | |
} | |
startStylesheet() { | |
this.ruleSet = new y | |
} | |
endStylesheet() { | |
this.parseTree = this.ruleSet, | |
this.ruleSet = null | |
} | |
startRuleSet(e) { | |
this.rule || (this.rule = new b(c.STYLE_RULE,e.join(""))) | |
} | |
endRuleSet() { | |
var e = this.rule.declarations.map(j).join("; "); | |
this.rule.parsedCssText += this.rule.mSelectorText + " { " + e + " }", | |
this._addRule() | |
} | |
startAtRule(e, t) { | |
var n = t.join(""); | |
this.rule = new b(l[e],n,e + " ") | |
} | |
endAtRule() { | |
if (this.rule) { | |
this.rule.parsedCssText += this.rule.mSelectorText; | |
var e = this.rule.cssRules && this.rule.cssRules.map(j).join("\n"); | |
e && (this.rule.parsedCssText += " { " + e + " }"), | |
this._addRule() | |
} | |
} | |
startBlock() { | |
this.ruleSetStack.push(this.ruleSet), | |
this.ruleSet = this.rule, | |
this.rule = null | |
} | |
endBlock() { | |
this.rule = this.ruleSet, | |
this.ruleSet = this.ruleSetStack.pop() | |
} | |
declaration(e, t) { | |
this.rule.declarations || (this.rule.descriptors = this.rule.declarations = []), | |
this.rule.declarations.push(new E(e,t)) | |
} | |
getParseTree() { | |
return this.parseTree | |
} | |
getRule() { | |
return this.rule | |
} | |
reset() { | |
this.parseTree = null, | |
this.rule = null, | |
this.ruleSet = null, | |
this.ruleSetStack.length = 0 | |
} | |
} | |
const A = "[\\t\\n\\f ]" | |
, C = A + "*" | |
, L = "(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])" | |
, R = "\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'" | |
, S = new RegExp(["\\uFEFF", "U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?", "url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]", "(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]", "(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*", R, "[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?", "\x3c!--", "--\x3e", "[\\t\\n\\f ]+", "/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)", "[~|^$*]=", "[^\"'\\\\/]|/(?![/*])"].join("|"),"gi") | |
, T = "'".charCodeAt(0) | |
, x = '"'.charCodeAt(0) | |
, I = "/".charCodeAt(0) | |
, O = " ".charCodeAt(0) | |
, U = new RegExp("^url\\(" + C + "[\"']?|[\"']?" + C + "\\)$","gi") | |
, M = /[\u0000-\u001f\\"<>]/g | |
, Q = { | |
"\\": "\\\\" | |
} | |
, k = { | |
"\\": "%5c" | |
}; | |
function P(e) { | |
var t = parseInt(e.substring(1), 16); | |
return t > 65535 ? (t -= 65536, | |
String.fromCharCode(55296 + (t >> 10), 56320 + (1023 & t))) : isNaN(t) ? e[1] < " " ? "" : e[1] : String.fromCharCode(t) | |
} | |
function N(e, t) { | |
return '"' + e.replace(M, t) + '"' | |
} | |
function D(e) { | |
return Q[e] || (Q[e] = "\\\\" + e.charCodeAt(0).toString(16) + " ") | |
} | |
function B(e) { | |
return k[e] || (k[e] = (e < "" ? "%0" : "%") + e.charCodeAt(0).toString(16)) | |
} | |
function F(e, t) { | |
return e === I && t > 1 | |
} | |
function Z(e, t) { | |
return e <= O || "\\" === t || "--\x3e" === t || "\x3c!--" === t || "\ufeff" === t | |
} | |
function Y(e) { | |
return function(e) { | |
for (var t, n = 0, r = " ", o = 0, i = e.length; o < i; o++) { | |
var s = e[o].replace(new RegExp("\\\\(?:" + L + "|[\\n\\f])","g"), P) | |
, u = s.length | |
, a = s.charCodeAt(0); | |
Z(a, s) || F(a, u) ? s = " " : (t = a) === x || t === T ? s = N(s.substring(1, u - 1), D) : /url\(/i.test(s) && (s = "url(" + N(s.replace(U, ""), B) + ")"), | |
s === r && " " === s || (e[n++] = r = s) | |
} | |
return e.length = n, | |
e | |
}((e = e && e.replace(/\r\n?/g, "\n") || "").match(S) || []) | |
} | |
const K = /^-?[a-z]/i | |
, W = { | |
"{": !0, | |
"}": !0, | |
";": !0, | |
"@": !0 | |
}; | |
function z(e, t, n, r) { | |
for (var o, i, s, u = [], a = -1; t < n; t++) | |
if ("[" === (o = e[t].charAt(0)) || "(" === o) | |
u[++a] = o; | |
else if (i = u[a], | |
s = o, | |
"[" === i && "]" === s || "(" === i && ")" === s) | |
a--; | |
else if (W[o] || ":" === o && !r) | |
break; | |
return a >= 0 && (t = ~(t + 1)), | |
t | |
} | |
function q(e, t, n, r) { | |
var o, i = t[n++]; | |
if (!K.test(i)) | |
return n + 1; | |
if (n < r && " " === t[n] && n++, | |
n === r || ":" !== t[n]) { | |
for (; n < r && ";" !== (o = t[n]) && "}" !== o; ) | |
n++; | |
return n | |
} | |
++n < r && " " === t[n] && n++; | |
var s = n | |
, u = z(t, n, r); | |
if (u < 0) | |
u = ~u; | |
else { | |
for (var a = [], c = 0, l = s; l < u; l++) | |
" " !== (o = t[l]) && (a[c++] = o); | |
if (u < r) { | |
do { | |
if (";" === (o = t[u]) || "}" === o) | |
break; | |
c = 0 | |
} while (++u < r);";" === o && u++ | |
} | |
c > 0 && e.declaration(i.toLowerCase(), a) | |
} | |
return u | |
} | |
function G(e, t, n, r) { | |
var o = n | |
, i = z(t, n, r, !0); | |
if (i < 0) | |
return n === (i = ~i) ? i + 1 : i; | |
n = i, | |
i > o && " " === t[i - 1] && i--; | |
var s = t[n]; | |
if (n++, | |
"{" !== s) | |
return n; | |
for (e.startRuleSet(t.slice(o, i)); n < r && "}" !== (s = t[n]); ) | |
n = " " === s ? n + 1 : q(e, t, n, r); | |
return e.endRuleSet(), | |
n < r ? n + 1 : n | |
} | |
function H(e, t, n, r, o) { | |
for (var i = n++; n < r && "{" !== t[n] && ";" !== t[n]; ) | |
n++; | |
if (n < r && (o || ";" === t[n])) { | |
var s = i + 1 | |
, u = n; | |
s < r && " " === t[s] && s++, | |
u > s && " " === t[u - 1] && u--; | |
var a = t[i].toLowerCase(); | |
e.startAtRule(a, t.slice(s, u)), | |
n = "@page" === a || "@font-face" === a ? G(e, t, n, r) : "{" === t[n] ? function e(t, n, r, o) { | |
r++, | |
t.startBlock(); | |
for (; r < o; ) { | |
var i = n[r].charAt(0); | |
if ("}" === i) { | |
r++; | |
break | |
} | |
" " === i || ";" === i ? r++ : r = "@" === i ? H(t, n, r, o, !1) : "{" === i ? e(t, n, r, o) : G(t, n, r, o) | |
} | |
return t.endBlock(), | |
r | |
}(e, t, n, r) : n + 1, | |
e.endAtRule() | |
} | |
return n | |
} | |
function V(e, t, n, r) { | |
return n < r ? "@" === t[n].charAt(0) ? H(e, t, n, r, !0) : G(e, t, n, r) : n | |
} | |
class X { | |
constructor() { | |
this.astBuilder = new w | |
} | |
parseDeclarations(e, t) { | |
t && this.astBuilder.reset(), | |
this.astBuilder.startRuleSet([]); | |
for (var n = Y(e), r = 0, o = n.length; r < o; ) | |
r = " " !== n[r] ? q(this.astBuilder, n, r, o) : r + 1; | |
return this.astBuilder.getRule() | |
} | |
parse(e) { | |
return function(e, t) { | |
var n = Y(t); | |
e.startStylesheet(); | |
for (var r = 0, o = n.length; r < o; ) | |
r = " " === n[r] ? r + 1 : V(e, n, r, o); | |
e.endStylesheet() | |
}(this.astBuilder, e), | |
this.astBuilder.getParseTree() | |
} | |
} | |
var J = n("./node_modules/postal/lib/postal.js") | |
, $ = n.n(J); | |
$.a.channel("reader"); | |
new X; | |
var ee = 0; | |
function te() { | |
return Date.now() - ee | |
} | |
function ne(e) { | |
return e.fetchTime().then(e=>{ | |
var t = Number.parseInt(e, 10); | |
!t || isNaN(t) ? console.warn("Invalid remote time", e) : ee = Date.now() - new Date(t).getTime() | |
} | |
).catch(e=>{ | |
console.warn("Could not fetch remote time", e) | |
} | |
) | |
} | |
" ".charCodeAt(0), | |
"function" == typeof TextEncoder && new TextEncoder; | |
EventTarget; | |
n("./node_modules/core-js/modules/es.typed-array.int32-array.js"), | |
n("./node_modules/core-js/modules/es.typed-array.uint8-array.js"); | |
const re = new Int32Array(new ArrayBuffer(1024)) | |
, oe = new Int32Array(new ArrayBuffer(1024)) | |
, ie = new Int32Array(new ArrayBuffer(1024)) | |
, se = new Int32Array(new ArrayBuffer(1024)) | |
, ue = new Uint8Array(new ArrayBuffer(256)) | |
, ae = new Uint8Array(new ArrayBuffer(256)); | |
!function() { | |
for (var e, t, n, r, o, i, s = [], u = [], a = 0; a < 256; a++) | |
u[(s[a] = a << 1 ^ 283 * (a >> 7)) ^ a] = a; | |
for (e = t = 0; !ue[e]; e ^= n || 1, | |
t = u[t] || 1) | |
o = (o = t ^ t << 1 ^ t << 2 ^ t << 3 ^ t << 4) >> 8 ^ 255 & o ^ 99, | |
ue[e] = o, | |
ae[o] = e, | |
i = 16843009 * s[r = s[n = s[e]]] ^ 65537 * r ^ 257 * n ^ 16843008 * e, | |
re[o] = i = i << 24 ^ i >>> 8, | |
oe[o] = i = i << 24 ^ i >>> 8, | |
ie[o] = i = i << 24 ^ i >>> 8, | |
se[o] = i = i << 24 ^ i >>> 8 | |
}(); | |
o.a.READER.ANNOTATIONS.DOGEAR_CLASSNAME; | |
n("./musketeer/modules/tolino-shared/services/zip/zip.worker.js"); | |
n("./node_modules/core-js/modules/es.typed-array.uint16-array.js"); | |
let ce = {}; | |
const le = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" | |
, fe = "function" == typeof TextDecoder ? new TextDecoder("utf-8") : null | |
, de = "function" == typeof TextDecoder ? new TextDecoder("utf-16") : null; | |
let he; | |
try { | |
String.fromCharCode.apply(null, new Uint8Array(new ArrayBuffer(1))), | |
he = !0 | |
} catch (e) { | |
he = !1 | |
} | |
function pe(e) { | |
return e && 239 === e[0] && 187 === e[1] && 191 === e[2] | |
} | |
function ve(e, t, n) { | |
let r = ""; | |
const o = e && e.subarray || Array.prototype.slice; | |
let i, s; | |
void 0 === n && (n = e && e.length || 0); | |
for (let u = t || 0; u < n; u += 65536) | |
i = Math.min(u + 65536, n), | |
s = o.call(e, u, i), | |
r += String.fromCharCode.apply(null, s); | |
return r | |
} | |
ce.hasUTF16ByteOrderMark = function(e) { | |
return e && (255 === e[0] && 254 === e[1] || 254 === e[0] && 255 === e[1]) | |
} | |
, | |
ce.asNumber = function(e) { | |
let t = 0; | |
for (let n = e.length - 1; n >= 0; n--) { | |
let r = e[n]; | |
t = (t << 8) + (r < 0 ? r + 256 : r) | |
} | |
return t | |
} | |
, | |
ce.asBase64 = function(e) { | |
if (window.btoa) | |
return btoa(ve(e)); | |
let t = pe(e) ? 3 : 0; | |
const n = [] | |
, r = e ? e.length : 0 | |
, o = r % 3 | |
, i = r - o; | |
let s, u, a, c, l; | |
for (; t < i; t += 3) | |
l = e[t] << 16 | e[t + 1] << 8 | e[t + 2], | |
s = (16515072 & l) >> 18, | |
u = (258048 & l) >> 12, | |
a = (4032 & l) >> 6, | |
c = 63 & l, | |
n.push(le[s], le[u], le[a], le[c]); | |
return o > 0 && (1 === o ? (l = e[i], | |
s = (252 & l) >> 2, | |
u = (3 & l) << 4, | |
a = 64) : (l = e[i] << 8 | e[i + 1], | |
s = (16128 & l) >> 8, | |
u = (1008 & l) >> 4, | |
a = (15 & l) << 2), | |
n.push(le[s], le[u], le[a], le[64])), | |
n.join("") | |
} | |
, | |
ce.asUTF8String = fe ? e=>fe.decode(e) : e=>{ | |
let t, n, r = pe(e) ? 3 : 0; | |
const o = e && e.length || 0; | |
let i = 0; | |
const s = he ? new Uint16Array(new ArrayBuffer(2 * o)) : new Array(o); | |
for (; r < o; r++) | |
t = e[r], | |
t < 128 ? s[i++] = t : t >= 194 && t < 224 ? s[i++] = ((31 & t) << 6) + (63 & e[++r]) : t >= 224 && t < 240 ? s[i++] = ((255 & t) << 12) + ((63 & e[++r]) << 6) + (63 & e[++r]) : t >= 240 && t < 245 && (n = ((7 & t) << 18) + ((63 & e[++r]) << 12) + ((63 & e[++r]) << 6) + (63 & e[++r]) - 65536, | |
s[i++] = 55296 + (n >> 10), | |
s[i++] = 56320 + (1023 & n)); | |
return ve(s, 0, i) | |
} | |
, | |
ce.asUTF16String = de ? e=>de.decode(e) : e=>{ | |
let t = 0 | |
, n = 1 | |
, r = 0; | |
254 === e[0] && 255 === e[1] ? (t = 2, | |
n = 0, | |
r = 1) : 255 === e[0] && 254 === e[1] && (t = 2); | |
let o = 0; | |
const i = e.length | |
, s = he ? new Uint16Array(new ArrayBuffer(i)) : new Array(Math.ceil(i / 2)); | |
for (; t < i; t += 2) | |
s[o++] = (e[t + n] << 8) + e[t + r]; | |
return ve(s, 0, o) | |
} | |
; | |
$.a.channel("reader"); | |
o.a.READER.FONT; | |
$.a.channel("reader"); | |
n("./musketeer/modules/tolino-shared/services/Metadata.js"); | |
n("./musketeer/modules/tolino-shared/services/Reseller.js"); | |
o.a.MISC.PROTECTION_TYPE; | |
const _e = Object.freeze(Object.create(null)) | |
, ge = { | |
UNPROTECTED: "Unprotected", | |
ADOBE_DRM: "Adobe DRM", | |
TOLINO_ENCRYPTION: "DRM", | |
WATERMARK: "Watermark" | |
}; | |
function je(e, t) { | |
let n; | |
const r = e.find(e=>"COVER_IMAGE" === e.type); | |
if (null != r && r.resource) | |
switch (n = r.resource, | |
t) { | |
case "EBOOK": | |
return n + "?size=BS-B03"; | |
case "AUDIOBOOK": | |
return n + "?size=WS-B04" | |
} | |
return n | |
} | |
function me(e) { | |
self.postMessage(e) | |
} | |
function ye(e) { | |
return function(e) { | |
return new Promise((t,n)=>{ | |
if (!self.navigator.onLine) | |
return e.error = !0, | |
e.log = "offline", | |
n(e); | |
var r = new XMLHttpRequest | |
, o = e.config.URL_INVENTORY + "/v2/inventory?page=" + e.nextPage + "&size=100&sort=RECENT"; | |
"delta-inventory" !== e.request && (o += "&fullResponse=true"), | |
r.open("GET", o, !0), | |
r.responseType = "json", | |
r.setRequestHeader("Accept", "application/json"), | |
r.setRequestHeader("authorization", "Bearer " + e.header.t_auth_token), | |
r.setRequestHeader("hardware-id", e.header.hardware_id), | |
r.setRequestHeader("reseller-id", e.header.reseller_id), | |
r.timeout = 1e4, | |
"delta-inventory" === e.request && r.setRequestHeader("If-Modified-Since", new Date(e.lastModified).toUTCString()), | |
r.onload = function() { | |
r.status >= 400 && (e.error = !0, | |
e.details = { | |
status: r.status, | |
response: r.response | |
}, | |
e.log = "XHR ERROR", | |
n(e)), | |
304 === r.status ? (e.details = { | |
status: r.status, | |
response: "" | |
}, | |
e.log = "No updates", | |
e.entitlements = [], | |
t(e)) : (e[e.nextPage] = r.response, | |
t(e)), | |
r.ontimeout = r.onload = r.onerror = null | |
} | |
, | |
r.ontimeout = r.onerror = function() { | |
return e.error = !0, | |
e.details = { | |
status: r.status, | |
response: r.response | |
}, | |
e.log = "XHR FAILED", | |
r.onload = r.onerror = null, | |
n(e) | |
} | |
, | |
r.send(null) | |
} | |
) | |
}(e).then(be).then(e=>e.nextPage > 0 ? ye(e) : Promise.resolve(null)) | |
} | |
function be(e) { | |
const t = e[e.nextPage]; | |
if (t) { | |
const n = t.page; | |
e.time = t.lastModifiedDate, | |
e.deleted = t.deletedContent || [], | |
e.entitlements = function(e) { | |
const t = {}; | |
return e.forEach(e=>{ | |
var n, r; | |
return t[e.publicationId] = { | |
author: (r = e.authors, | |
!r || Object.values(r[0]).every(e=>null === e || "" === e) ? new Array({ | |
name: "" | |
}) : r), | |
audioInfos: e.audioContentInfo && Object.assign(e.audioContentInfo, { | |
tracks: e.audioContentInfo.tracksNumber | |
}), | |
bookmark: _e, | |
clientData: { | |
isAvailableOffline: !1, | |
isFinished: !1, | |
isSynced: !1, | |
hasUnsupportedFeat: !1 | |
}, | |
comments: [], | |
coverURI: e.defaultCover ? null : je(e.fileResources, e.contentSources.includes("USER_UPLOAD") ? "EDATA" : e.contentType), | |
description: e.abstract, | |
dogears: [], | |
isShareable: e.familySharing, | |
id: e.publicationId, | |
isbn: e.isbnEan, | |
isSample: e.contentSources.includes("PREVIEW"), | |
issueDate: e.issuedDate, | |
isTTSEnabled: e.readableContentInfo && e.readableContentInfo.isTextToSpeechEnabled, | |
keywords: e.keywords, | |
protectionType: ge[e.contentProtectionType], | |
publicationId: e.publicationId, | |
publisher: e.publisher, | |
purchaseDate: e.purchasedDate, | |
reseller: { | |
id: e.resellerId, | |
name: e.resellerName | |
}, | |
series: { | |
title: e.subtitle, | |
episodeNo: e.sequenceNo | |
}, | |
subscriptionId: null === (n = e.subscriptionInfo) || void 0 === n ? void 0 : n.subscriptionId, | |
subscriptionInfo: e.subscriptionInfo, | |
subtitle: e.subtitle, | |
tags: [], | |
title: e.title, | |
transactionId: e.transactionId, | |
type: { | |
category: e.contentSources.includes("USER_UPLOAD") ? "EDATA" : e.contentType, | |
fileType: e.contentFormat, | |
specVersion: "", | |
sources: e.contentSources | |
} | |
} | |
} | |
), | |
t | |
}(n.content), | |
e.nextPage = n.number + 1 < n.totalPages ? n.number + 1 : -1 | |
} else | |
e.time = e.lastModified, | |
e.nextPage = -1; | |
return me(e), | |
delete e.entitlements, | |
Promise.resolve(e) | |
} | |
self.addEventListener("message", (function(e) { | |
var t; | |
null !== (t = e.data) && void 0 !== t && t.request ? Ee(e.data) : me({ | |
error: !0, | |
log: "no message given" | |
}) | |
} | |
)); | |
var Ee = function(e) { | |
switch (e.request) { | |
case "full-inventory": | |
case "delta-inventory": | |
return e.nextPage = 0, | |
ye(e).catch(me); | |
default: | |
return e.error = !0, | |
e.log = "unknown request", | |
me(e) | |
} | |
} | |
}, | |
"./node_modules/base64-js/index.js": function(e, t, n) { | |
"use strict"; | |
t.byteLength = function(e) { | |
var t = c(e) | |
, n = t[0] | |
, r = t[1]; | |
return 3 * (n + r) / 4 - r | |
} | |
, | |
t.toByteArray = function(e) { | |
var t, n, r = c(e), s = r[0], u = r[1], a = new i(function(e, t, n) { | |
return 3 * (t + n) / 4 - n | |
}(0, s, u)), l = 0, f = u > 0 ? s - 4 : s; | |
for (n = 0; n < f; n += 4) | |
t = o[e.charCodeAt(n)] << 18 | o[e.charCodeAt(n + 1)] << 12 | o[e.charCodeAt(n + 2)] << 6 | o[e.charCodeAt(n + 3)], | |
a[l++] = t >> 16 & 255, | |
a[l++] = t >> 8 & 255, | |
a[l++] = 255 & t; | |
2 === u && (t = o[e.charCodeAt(n)] << 2 | o[e.charCodeAt(n + 1)] >> 4, | |
a[l++] = 255 & t); | |
1 === u && (t = o[e.charCodeAt(n)] << 10 | o[e.charCodeAt(n + 1)] << 4 | o[e.charCodeAt(n + 2)] >> 2, | |
a[l++] = t >> 8 & 255, | |
a[l++] = 255 & t); | |
return a | |
} | |
, | |
t.fromByteArray = function(e) { | |
for (var t, n = e.length, o = n % 3, i = [], s = 0, u = n - o; s < u; s += 16383) | |
i.push(l(e, s, s + 16383 > u ? u : s + 16383)); | |
1 === o ? (t = e[n - 1], | |
i.push(r[t >> 2] + r[t << 4 & 63] + "==")) : 2 === o && (t = (e[n - 2] << 8) + e[n - 1], | |
i.push(r[t >> 10] + r[t >> 4 & 63] + r[t << 2 & 63] + "=")); | |
return i.join("") | |
} | |
; | |
for (var r = [], o = [], i = "undefined" != typeof Uint8Array ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", u = 0, a = s.length; u < a; ++u) | |
r[u] = s[u], | |
o[s.charCodeAt(u)] = u; | |
function c(e) { | |
var t = e.length; | |
if (t % 4 > 0) | |
throw new Error("Invalid string. Length must be a multiple of 4"); | |
var n = e.indexOf("="); | |
return -1 === n && (n = t), | |
[n, n === t ? 0 : 4 - n % 4] | |
} | |
function l(e, t, n) { | |
for (var o, i, s = [], u = t; u < n; u += 3) | |
o = (e[u] << 16 & 16711680) + (e[u + 1] << 8 & 65280) + (255 & e[u + 2]), | |
s.push(r[(i = o) >> 18 & 63] + r[i >> 12 & 63] + r[i >> 6 & 63] + r[63 & i]); | |
return s.join("") | |
} | |
o["-".charCodeAt(0)] = 62, | |
o["_".charCodeAt(0)] = 63 | |
}, | |
"./node_modules/buffer/index.js": function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
/*! | |
* The buffer module from node.js, for the browser. | |
* | |
* @author Feross Aboukhadijeh <http://feross.org> | |
* @license MIT | |
*/ | |
var r = n("./node_modules/base64-js/index.js") | |
, o = n("./node_modules/ieee754/index.js") | |
, i = n("./node_modules/isarray/index.js"); | |
function s() { | |
return a.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823 | |
} | |
function u(e, t) { | |
if (s() < t) | |
throw new RangeError("Invalid typed array length"); | |
return a.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = a.prototype : (null === e && (e = new a(t)), | |
e.length = t), | |
e | |
} | |
function a(e, t, n) { | |
if (!(a.TYPED_ARRAY_SUPPORT || this instanceof a)) | |
return new a(e,t,n); | |
if ("number" == typeof e) { | |
if ("string" == typeof t) | |
throw new Error("If encoding is specified then the first argument must be a string"); | |
return f(this, e) | |
} | |
return c(this, e, t, n) | |
} | |
function c(e, t, n, r) { | |
if ("number" == typeof t) | |
throw new TypeError('"value" argument must not be a number'); | |
return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function(e, t, n, r) { | |
if (t.byteLength, | |
n < 0 || t.byteLength < n) | |
throw new RangeError("'offset' is out of bounds"); | |
if (t.byteLength < n + (r || 0)) | |
throw new RangeError("'length' is out of bounds"); | |
t = void 0 === n && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t,n) : new Uint8Array(t,n,r); | |
a.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = a.prototype : e = d(e, t); | |
return e | |
}(e, t, n, r) : "string" == typeof t ? function(e, t, n) { | |
"string" == typeof n && "" !== n || (n = "utf8"); | |
if (!a.isEncoding(n)) | |
throw new TypeError('"encoding" must be a valid string encoding'); | |
var r = 0 | p(t, n) | |
, o = (e = u(e, r)).write(t, n); | |
o !== r && (e = e.slice(0, o)); | |
return e | |
}(e, t, n) : function(e, t) { | |
if (a.isBuffer(t)) { | |
var n = 0 | h(t.length); | |
return 0 === (e = u(e, n)).length || t.copy(e, 0, 0, n), | |
e | |
} | |
if (t) { | |
if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length"in t) | |
return "number" != typeof t.length || (r = t.length) != r ? u(e, 0) : d(e, t); | |
if ("Buffer" === t.type && i(t.data)) | |
return d(e, t.data) | |
} | |
var r; | |
throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.") | |
}(e, t) | |
} | |
function l(e) { | |
if ("number" != typeof e) | |
throw new TypeError('"size" argument must be a number'); | |
if (e < 0) | |
throw new RangeError('"size" argument must not be negative') | |
} | |
function f(e, t) { | |
if (l(t), | |
e = u(e, t < 0 ? 0 : 0 | h(t)), | |
!a.TYPED_ARRAY_SUPPORT) | |
for (var n = 0; n < t; ++n) | |
e[n] = 0; | |
return e | |
} | |
function d(e, t) { | |
var n = t.length < 0 ? 0 : 0 | h(t.length); | |
e = u(e, n); | |
for (var r = 0; r < n; r += 1) | |
e[r] = 255 & t[r]; | |
return e | |
} | |
function h(e) { | |
if (e >= s()) | |
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s().toString(16) + " bytes"); | |
return 0 | e | |
} | |
function p(e, t) { | |
if (a.isBuffer(e)) | |
return e.length; | |
if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) | |
return e.byteLength; | |
"string" != typeof e && (e = "" + e); | |
var n = e.length; | |
if (0 === n) | |
return 0; | |
for (var r = !1; ; ) | |
switch (t) { | |
case "ascii": | |
case "latin1": | |
case "binary": | |
return n; | |
case "utf8": | |
case "utf-8": | |
case void 0: | |
return B(e).length; | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return 2 * n; | |
case "hex": | |
return n >>> 1; | |
case "base64": | |
return F(e).length; | |
default: | |
if (r) | |
return B(e).length; | |
t = ("" + t).toLowerCase(), | |
r = !0 | |
} | |
} | |
function v(e, t, n) { | |
var r = !1; | |
if ((void 0 === t || t < 0) && (t = 0), | |
t > this.length) | |
return ""; | |
if ((void 0 === n || n > this.length) && (n = this.length), | |
n <= 0) | |
return ""; | |
if ((n >>>= 0) <= (t >>>= 0)) | |
return ""; | |
for (e || (e = "utf8"); ; ) | |
switch (e) { | |
case "hex": | |
return T(this, t, n); | |
case "utf8": | |
case "utf-8": | |
return L(this, t, n); | |
case "ascii": | |
return R(this, t, n); | |
case "latin1": | |
case "binary": | |
return S(this, t, n); | |
case "base64": | |
return C(this, t, n); | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return x(this, t, n); | |
default: | |
if (r) | |
throw new TypeError("Unknown encoding: " + e); | |
e = (e + "").toLowerCase(), | |
r = !0 | |
} | |
} | |
function _(e, t, n) { | |
var r = e[t]; | |
e[t] = e[n], | |
e[n] = r | |
} | |
function g(e, t, n, r, o) { | |
if (0 === e.length) | |
return -1; | |
if ("string" == typeof n ? (r = n, | |
n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), | |
n = +n, | |
isNaN(n) && (n = o ? 0 : e.length - 1), | |
n < 0 && (n = e.length + n), | |
n >= e.length) { | |
if (o) | |
return -1; | |
n = e.length - 1 | |
} else if (n < 0) { | |
if (!o) | |
return -1; | |
n = 0 | |
} | |
if ("string" == typeof t && (t = a.from(t, r)), | |
a.isBuffer(t)) | |
return 0 === t.length ? -1 : j(e, t, n, r, o); | |
if ("number" == typeof t) | |
return t &= 255, | |
a.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? o ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : j(e, [t], n, r, o); | |
throw new TypeError("val must be string, number or Buffer") | |
} | |
function j(e, t, n, r, o) { | |
var i, s = 1, u = e.length, a = t.length; | |
if (void 0 !== r && ("ucs2" === (r = String(r).toLowerCase()) || "ucs-2" === r || "utf16le" === r || "utf-16le" === r)) { | |
if (e.length < 2 || t.length < 2) | |
return -1; | |
s = 2, | |
u /= 2, | |
a /= 2, | |
n /= 2 | |
} | |
function c(e, t) { | |
return 1 === s ? e[t] : e.readUInt16BE(t * s) | |
} | |
if (o) { | |
var l = -1; | |
for (i = n; i < u; i++) | |
if (c(e, i) === c(t, -1 === l ? 0 : i - l)) { | |
if (-1 === l && (l = i), | |
i - l + 1 === a) | |
return l * s | |
} else | |
-1 !== l && (i -= i - l), | |
l = -1 | |
} else | |
for (n + a > u && (n = u - a), | |
i = n; i >= 0; i--) { | |
for (var f = !0, d = 0; d < a; d++) | |
if (c(e, i + d) !== c(t, d)) { | |
f = !1; | |
break | |
} | |
if (f) | |
return i | |
} | |
return -1 | |
} | |
function m(e, t, n, r) { | |
n = Number(n) || 0; | |
var o = e.length - n; | |
r ? (r = Number(r)) > o && (r = o) : r = o; | |
var i = t.length; | |
if (i % 2 != 0) | |
throw new TypeError("Invalid hex string"); | |
r > i / 2 && (r = i / 2); | |
for (var s = 0; s < r; ++s) { | |
var u = parseInt(t.substr(2 * s, 2), 16); | |
if (isNaN(u)) | |
return s; | |
e[n + s] = u | |
} | |
return s | |
} | |
function y(e, t, n, r) { | |
return Z(B(t, e.length - n), e, n, r) | |
} | |
function b(e, t, n, r) { | |
return Z(function(e) { | |
for (var t = [], n = 0; n < e.length; ++n) | |
t.push(255 & e.charCodeAt(n)); | |
return t | |
}(t), e, n, r) | |
} | |
function E(e, t, n, r) { | |
return b(e, t, n, r) | |
} | |
function w(e, t, n, r) { | |
return Z(F(t), e, n, r) | |
} | |
function A(e, t, n, r) { | |
return Z(function(e, t) { | |
for (var n, r, o, i = [], s = 0; s < e.length && !((t -= 2) < 0); ++s) | |
n = e.charCodeAt(s), | |
r = n >> 8, | |
o = n % 256, | |
i.push(o), | |
i.push(r); | |
return i | |
}(t, e.length - n), e, n, r) | |
} | |
function C(e, t, n) { | |
return 0 === t && n === e.length ? r.fromByteArray(e) : r.fromByteArray(e.slice(t, n)) | |
} | |
function L(e, t, n) { | |
n = Math.min(e.length, n); | |
for (var r = [], o = t; o < n; ) { | |
var i, s, u, a, c = e[o], l = null, f = c > 239 ? 4 : c > 223 ? 3 : c > 191 ? 2 : 1; | |
if (o + f <= n) | |
switch (f) { | |
case 1: | |
c < 128 && (l = c); | |
break; | |
case 2: | |
128 == (192 & (i = e[o + 1])) && (a = (31 & c) << 6 | 63 & i) > 127 && (l = a); | |
break; | |
case 3: | |
i = e[o + 1], | |
s = e[o + 2], | |
128 == (192 & i) && 128 == (192 & s) && (a = (15 & c) << 12 | (63 & i) << 6 | 63 & s) > 2047 && (a < 55296 || a > 57343) && (l = a); | |
break; | |
case 4: | |
i = e[o + 1], | |
s = e[o + 2], | |
u = e[o + 3], | |
128 == (192 & i) && 128 == (192 & s) && 128 == (192 & u) && (a = (15 & c) << 18 | (63 & i) << 12 | (63 & s) << 6 | 63 & u) > 65535 && a < 1114112 && (l = a) | |
} | |
null === l ? (l = 65533, | |
f = 1) : l > 65535 && (l -= 65536, | |
r.push(l >>> 10 & 1023 | 55296), | |
l = 56320 | 1023 & l), | |
r.push(l), | |
o += f | |
} | |
return function(e) { | |
var t = e.length; | |
if (t <= 4096) | |
return String.fromCharCode.apply(String, e); | |
var n = "" | |
, r = 0; | |
for (; r < t; ) | |
n += String.fromCharCode.apply(String, e.slice(r, r += 4096)); | |
return n | |
}(r) | |
} | |
t.Buffer = a, | |
t.SlowBuffer = function(e) { | |
+e != e && (e = 0); | |
return a.alloc(+e) | |
} | |
, | |
t.INSPECT_MAX_BYTES = 50, | |
a.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : function() { | |
try { | |
var e = new Uint8Array(1); | |
return e.__proto__ = { | |
__proto__: Uint8Array.prototype, | |
foo: function() { | |
return 42 | |
} | |
}, | |
42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength | |
} catch (e) { | |
return !1 | |
} | |
}(), | |
t.kMaxLength = s(), | |
a.poolSize = 8192, | |
a._augment = function(e) { | |
return e.__proto__ = a.prototype, | |
e | |
} | |
, | |
a.from = function(e, t, n) { | |
return c(null, e, t, n) | |
} | |
, | |
a.TYPED_ARRAY_SUPPORT && (a.prototype.__proto__ = Uint8Array.prototype, | |
a.__proto__ = Uint8Array, | |
"undefined" != typeof Symbol && Symbol.species && a[Symbol.species] === a && Object.defineProperty(a, Symbol.species, { | |
value: null, | |
configurable: !0 | |
})), | |
a.alloc = function(e, t, n) { | |
return function(e, t, n, r) { | |
return l(t), | |
t <= 0 ? u(e, t) : void 0 !== n ? "string" == typeof r ? u(e, t).fill(n, r) : u(e, t).fill(n) : u(e, t) | |
}(null, e, t, n) | |
} | |
, | |
a.allocUnsafe = function(e) { | |
return f(null, e) | |
} | |
, | |
a.allocUnsafeSlow = function(e) { | |
return f(null, e) | |
} | |
, | |
a.isBuffer = function(e) { | |
return !(null == e || !e._isBuffer) | |
} | |
, | |
a.compare = function(e, t) { | |
if (!a.isBuffer(e) || !a.isBuffer(t)) | |
throw new TypeError("Arguments must be Buffers"); | |
if (e === t) | |
return 0; | |
for (var n = e.length, r = t.length, o = 0, i = Math.min(n, r); o < i; ++o) | |
if (e[o] !== t[o]) { | |
n = e[o], | |
r = t[o]; | |
break | |
} | |
return n < r ? -1 : r < n ? 1 : 0 | |
} | |
, | |
a.isEncoding = function(e) { | |
switch (String(e).toLowerCase()) { | |
case "hex": | |
case "utf8": | |
case "utf-8": | |
case "ascii": | |
case "latin1": | |
case "binary": | |
case "base64": | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return !0; | |
default: | |
return !1 | |
} | |
} | |
, | |
a.concat = function(e, t) { | |
if (!i(e)) | |
throw new TypeError('"list" argument must be an Array of Buffers'); | |
if (0 === e.length) | |
return a.alloc(0); | |
var n; | |
if (void 0 === t) | |
for (t = 0, | |
n = 0; n < e.length; ++n) | |
t += e[n].length; | |
var r = a.allocUnsafe(t) | |
, o = 0; | |
for (n = 0; n < e.length; ++n) { | |
var s = e[n]; | |
if (!a.isBuffer(s)) | |
throw new TypeError('"list" argument must be an Array of Buffers'); | |
s.copy(r, o), | |
o += s.length | |
} | |
return r | |
} | |
, | |
a.byteLength = p, | |
a.prototype._isBuffer = !0, | |
a.prototype.swap16 = function() { | |
var e = this.length; | |
if (e % 2 != 0) | |
throw new RangeError("Buffer size must be a multiple of 16-bits"); | |
for (var t = 0; t < e; t += 2) | |
_(this, t, t + 1); | |
return this | |
} | |
, | |
a.prototype.swap32 = function() { | |
var e = this.length; | |
if (e % 4 != 0) | |
throw new RangeError("Buffer size must be a multiple of 32-bits"); | |
for (var t = 0; t < e; t += 4) | |
_(this, t, t + 3), | |
_(this, t + 1, t + 2); | |
return this | |
} | |
, | |
a.prototype.swap64 = function() { | |
var e = this.length; | |
if (e % 8 != 0) | |
throw new RangeError("Buffer size must be a multiple of 64-bits"); | |
for (var t = 0; t < e; t += 8) | |
_(this, t, t + 7), | |
_(this, t + 1, t + 6), | |
_(this, t + 2, t + 5), | |
_(this, t + 3, t + 4); | |
return this | |
} | |
, | |
a.prototype.toString = function() { | |
var e = 0 | this.length; | |
return 0 === e ? "" : 0 === arguments.length ? L(this, 0, e) : v.apply(this, arguments) | |
} | |
, | |
a.prototype.equals = function(e) { | |
if (!a.isBuffer(e)) | |
throw new TypeError("Argument must be a Buffer"); | |
return this === e || 0 === a.compare(this, e) | |
} | |
, | |
a.prototype.inspect = function() { | |
var e = "" | |
, n = t.INSPECT_MAX_BYTES; | |
return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g).join(" "), | |
this.length > n && (e += " ... ")), | |
"<Buffer " + e + ">" | |
} | |
, | |
a.prototype.compare = function(e, t, n, r, o) { | |
if (!a.isBuffer(e)) | |
throw new TypeError("Argument must be a Buffer"); | |
if (void 0 === t && (t = 0), | |
void 0 === n && (n = e ? e.length : 0), | |
void 0 === r && (r = 0), | |
void 0 === o && (o = this.length), | |
t < 0 || n > e.length || r < 0 || o > this.length) | |
throw new RangeError("out of range index"); | |
if (r >= o && t >= n) | |
return 0; | |
if (r >= o) | |
return -1; | |
if (t >= n) | |
return 1; | |
if (this === e) | |
return 0; | |
for (var i = (o >>>= 0) - (r >>>= 0), s = (n >>>= 0) - (t >>>= 0), u = Math.min(i, s), c = this.slice(r, o), l = e.slice(t, n), f = 0; f < u; ++f) | |
if (c[f] !== l[f]) { | |
i = c[f], | |
s = l[f]; | |
break | |
} | |
return i < s ? -1 : s < i ? 1 : 0 | |
} | |
, | |
a.prototype.includes = function(e, t, n) { | |
return -1 !== this.indexOf(e, t, n) | |
} | |
, | |
a.prototype.indexOf = function(e, t, n) { | |
return g(this, e, t, n, !0) | |
} | |
, | |
a.prototype.lastIndexOf = function(e, t, n) { | |
return g(this, e, t, n, !1) | |
} | |
, | |
a.prototype.write = function(e, t, n, r) { | |
if (void 0 === t) | |
r = "utf8", | |
n = this.length, | |
t = 0; | |
else if (void 0 === n && "string" == typeof t) | |
r = t, | |
n = this.length, | |
t = 0; | |
else { | |
if (!isFinite(t)) | |
throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); | |
t |= 0, | |
isFinite(n) ? (n |= 0, | |
void 0 === r && (r = "utf8")) : (r = n, | |
n = void 0) | |
} | |
var o = this.length - t; | |
if ((void 0 === n || n > o) && (n = o), | |
e.length > 0 && (n < 0 || t < 0) || t > this.length) | |
throw new RangeError("Attempt to write outside buffer bounds"); | |
r || (r = "utf8"); | |
for (var i = !1; ; ) | |
switch (r) { | |
case "hex": | |
return m(this, e, t, n); | |
case "utf8": | |
case "utf-8": | |
return y(this, e, t, n); | |
case "ascii": | |
return b(this, e, t, n); | |
case "latin1": | |
case "binary": | |
return E(this, e, t, n); | |
case "base64": | |
return w(this, e, t, n); | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return A(this, e, t, n); | |
default: | |
if (i) | |
throw new TypeError("Unknown encoding: " + r); | |
r = ("" + r).toLowerCase(), | |
i = !0 | |
} | |
} | |
, | |
a.prototype.toJSON = function() { | |
return { | |
type: "Buffer", | |
data: Array.prototype.slice.call(this._arr || this, 0) | |
} | |
} | |
; | |
function R(e, t, n) { | |
var r = ""; | |
n = Math.min(e.length, n); | |
for (var o = t; o < n; ++o) | |
r += String.fromCharCode(127 & e[o]); | |
return r | |
} | |
function S(e, t, n) { | |
var r = ""; | |
n = Math.min(e.length, n); | |
for (var o = t; o < n; ++o) | |
r += String.fromCharCode(e[o]); | |
return r | |
} | |
function T(e, t, n) { | |
var r = e.length; | |
(!t || t < 0) && (t = 0), | |
(!n || n < 0 || n > r) && (n = r); | |
for (var o = "", i = t; i < n; ++i) | |
o += D(e[i]); | |
return o | |
} | |
function x(e, t, n) { | |
for (var r = e.slice(t, n), o = "", i = 0; i < r.length; i += 2) | |
o += String.fromCharCode(r[i] + 256 * r[i + 1]); | |
return o | |
} | |
function I(e, t, n) { | |
if (e % 1 != 0 || e < 0) | |
throw new RangeError("offset is not uint"); | |
if (e + t > n) | |
throw new RangeError("Trying to access beyond buffer length") | |
} | |
function O(e, t, n, r, o, i) { | |
if (!a.isBuffer(e)) | |
throw new TypeError('"buffer" argument must be a Buffer instance'); | |
if (t > o || t < i) | |
throw new RangeError('"value" argument is out of bounds'); | |
if (n + r > e.length) | |
throw new RangeError("Index out of range") | |
} | |
function U(e, t, n, r) { | |
t < 0 && (t = 65535 + t + 1); | |
for (var o = 0, i = Math.min(e.length - n, 2); o < i; ++o) | |
e[n + o] = (t & 255 << 8 * (r ? o : 1 - o)) >>> 8 * (r ? o : 1 - o) | |
} | |
function M(e, t, n, r) { | |
t < 0 && (t = 4294967295 + t + 1); | |
for (var o = 0, i = Math.min(e.length - n, 4); o < i; ++o) | |
e[n + o] = t >>> 8 * (r ? o : 3 - o) & 255 | |
} | |
function Q(e, t, n, r, o, i) { | |
if (n + r > e.length) | |
throw new RangeError("Index out of range"); | |
if (n < 0) | |
throw new RangeError("Index out of range") | |
} | |
function k(e, t, n, r, i) { | |
return i || Q(e, 0, n, 4), | |
o.write(e, t, n, r, 23, 4), | |
n + 4 | |
} | |
function P(e, t, n, r, i) { | |
return i || Q(e, 0, n, 8), | |
o.write(e, t, n, r, 52, 8), | |
n + 8 | |
} | |
a.prototype.slice = function(e, t) { | |
var n, r = this.length; | |
if ((e = ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), | |
(t = void 0 === t ? r : ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), | |
t < e && (t = e), | |
a.TYPED_ARRAY_SUPPORT) | |
(n = this.subarray(e, t)).__proto__ = a.prototype; | |
else { | |
var o = t - e; | |
n = new a(o,void 0); | |
for (var i = 0; i < o; ++i) | |
n[i] = this[i + e] | |
} | |
return n | |
} | |
, | |
a.prototype.readUIntLE = function(e, t, n) { | |
e |= 0, | |
t |= 0, | |
n || I(e, t, this.length); | |
for (var r = this[e], o = 1, i = 0; ++i < t && (o *= 256); ) | |
r += this[e + i] * o; | |
return r | |
} | |
, | |
a.prototype.readUIntBE = function(e, t, n) { | |
e |= 0, | |
t |= 0, | |
n || I(e, t, this.length); | |
for (var r = this[e + --t], o = 1; t > 0 && (o *= 256); ) | |
r += this[e + --t] * o; | |
return r | |
} | |
, | |
a.prototype.readUInt8 = function(e, t) { | |
return t || I(e, 1, this.length), | |
this[e] | |
} | |
, | |
a.prototype.readUInt16LE = function(e, t) { | |
return t || I(e, 2, this.length), | |
this[e] | this[e + 1] << 8 | |
} | |
, | |
a.prototype.readUInt16BE = function(e, t) { | |
return t || I(e, 2, this.length), | |
this[e] << 8 | this[e + 1] | |
} | |
, | |
a.prototype.readUInt32LE = function(e, t) { | |
return t || I(e, 4, this.length), | |
(this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3] | |
} | |
, | |
a.prototype.readUInt32BE = function(e, t) { | |
return t || I(e, 4, this.length), | |
16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]) | |
} | |
, | |
a.prototype.readIntLE = function(e, t, n) { | |
e |= 0, | |
t |= 0, | |
n || I(e, t, this.length); | |
for (var r = this[e], o = 1, i = 0; ++i < t && (o *= 256); ) | |
r += this[e + i] * o; | |
return r >= (o *= 128) && (r -= Math.pow(2, 8 * t)), | |
r | |
} | |
, | |
a.prototype.readIntBE = function(e, t, n) { | |
e |= 0, | |
t |= 0, | |
n || I(e, t, this.length); | |
for (var r = t, o = 1, i = this[e + --r]; r > 0 && (o *= 256); ) | |
i += this[e + --r] * o; | |
return i >= (o *= 128) && (i -= Math.pow(2, 8 * t)), | |
i | |
} | |
, | |
a.prototype.readInt8 = function(e, t) { | |
return t || I(e, 1, this.length), | |
128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] | |
} | |
, | |
a.prototype.readInt16LE = function(e, t) { | |
t || I(e, 2, this.length); | |
var n = this[e] | this[e + 1] << 8; | |
return 32768 & n ? 4294901760 | n : n | |
} | |
, | |
a.prototype.readInt16BE = function(e, t) { | |
t || I(e, 2, this.length); | |
var n = this[e + 1] | this[e] << 8; | |
return 32768 & n ? 4294901760 | n : n | |
} | |
, | |
a.prototype.readInt32LE = function(e, t) { | |
return t || I(e, 4, this.length), | |
this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24 | |
} | |
, | |
a.prototype.readInt32BE = function(e, t) { | |
return t || I(e, 4, this.length), | |
this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3] | |
} | |
, | |
a.prototype.readFloatLE = function(e, t) { | |
return t || I(e, 4, this.length), | |
o.read(this, e, !0, 23, 4) | |
} | |
, | |
a.prototype.readFloatBE = function(e, t) { | |
return t || I(e, 4, this.length), | |
o.read(this, e, !1, 23, 4) | |
} | |
, | |
a.prototype.readDoubleLE = function(e, t) { | |
return t || I(e, 8, this.length), | |
o.read(this, e, !0, 52, 8) | |
} | |
, | |
a.prototype.readDoubleBE = function(e, t) { | |
return t || I(e, 8, this.length), | |
o.read(this, e, !1, 52, 8) | |
} | |
, | |
a.prototype.writeUIntLE = function(e, t, n, r) { | |
(e = +e, | |
t |= 0, | |
n |= 0, | |
r) || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0); | |
var o = 1 | |
, i = 0; | |
for (this[t] = 255 & e; ++i < n && (o *= 256); ) | |
this[t + i] = e / o & 255; | |
return t + n | |
} | |
, | |
a.prototype.writeUIntBE = function(e, t, n, r) { | |
(e = +e, | |
t |= 0, | |
n |= 0, | |
r) || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0); | |
var o = n - 1 | |
, i = 1; | |
for (this[t + o] = 255 & e; --o >= 0 && (i *= 256); ) | |
this[t + o] = e / i & 255; | |
return t + n | |
} | |
, | |
a.prototype.writeUInt8 = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 1, 255, 0), | |
a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), | |
this[t] = 255 & e, | |
t + 1 | |
} | |
, | |
a.prototype.writeUInt16LE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 2, 65535, 0), | |
a.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, | |
this[t + 1] = e >>> 8) : U(this, e, t, !0), | |
t + 2 | |
} | |
, | |
a.prototype.writeUInt16BE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 2, 65535, 0), | |
a.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, | |
this[t + 1] = 255 & e) : U(this, e, t, !1), | |
t + 2 | |
} | |
, | |
a.prototype.writeUInt32LE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 4, 4294967295, 0), | |
a.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, | |
this[t + 2] = e >>> 16, | |
this[t + 1] = e >>> 8, | |
this[t] = 255 & e) : M(this, e, t, !0), | |
t + 4 | |
} | |
, | |
a.prototype.writeUInt32BE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 4, 4294967295, 0), | |
a.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, | |
this[t + 1] = e >>> 16, | |
this[t + 2] = e >>> 8, | |
this[t + 3] = 255 & e) : M(this, e, t, !1), | |
t + 4 | |
} | |
, | |
a.prototype.writeIntLE = function(e, t, n, r) { | |
if (e = +e, | |
t |= 0, | |
!r) { | |
var o = Math.pow(2, 8 * n - 1); | |
O(this, e, t, n, o - 1, -o) | |
} | |
var i = 0 | |
, s = 1 | |
, u = 0; | |
for (this[t] = 255 & e; ++i < n && (s *= 256); ) | |
e < 0 && 0 === u && 0 !== this[t + i - 1] && (u = 1), | |
this[t + i] = (e / s >> 0) - u & 255; | |
return t + n | |
} | |
, | |
a.prototype.writeIntBE = function(e, t, n, r) { | |
if (e = +e, | |
t |= 0, | |
!r) { | |
var o = Math.pow(2, 8 * n - 1); | |
O(this, e, t, n, o - 1, -o) | |
} | |
var i = n - 1 | |
, s = 1 | |
, u = 0; | |
for (this[t + i] = 255 & e; --i >= 0 && (s *= 256); ) | |
e < 0 && 0 === u && 0 !== this[t + i + 1] && (u = 1), | |
this[t + i] = (e / s >> 0) - u & 255; | |
return t + n | |
} | |
, | |
a.prototype.writeInt8 = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 1, 127, -128), | |
a.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), | |
e < 0 && (e = 255 + e + 1), | |
this[t] = 255 & e, | |
t + 1 | |
} | |
, | |
a.prototype.writeInt16LE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 2, 32767, -32768), | |
a.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, | |
this[t + 1] = e >>> 8) : U(this, e, t, !0), | |
t + 2 | |
} | |
, | |
a.prototype.writeInt16BE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 2, 32767, -32768), | |
a.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, | |
this[t + 1] = 255 & e) : U(this, e, t, !1), | |
t + 2 | |
} | |
, | |
a.prototype.writeInt32LE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 4, 2147483647, -2147483648), | |
a.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, | |
this[t + 1] = e >>> 8, | |
this[t + 2] = e >>> 16, | |
this[t + 3] = e >>> 24) : M(this, e, t, !0), | |
t + 4 | |
} | |
, | |
a.prototype.writeInt32BE = function(e, t, n) { | |
return e = +e, | |
t |= 0, | |
n || O(this, e, t, 4, 2147483647, -2147483648), | |
e < 0 && (e = 4294967295 + e + 1), | |
a.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, | |
this[t + 1] = e >>> 16, | |
this[t + 2] = e >>> 8, | |
this[t + 3] = 255 & e) : M(this, e, t, !1), | |
t + 4 | |
} | |
, | |
a.prototype.writeFloatLE = function(e, t, n) { | |
return k(this, e, t, !0, n) | |
} | |
, | |
a.prototype.writeFloatBE = function(e, t, n) { | |
return k(this, e, t, !1, n) | |
} | |
, | |
a.prototype.writeDoubleLE = function(e, t, n) { | |
return P(this, e, t, !0, n) | |
} | |
, | |
a.prototype.writeDoubleBE = function(e, t, n) { | |
return P(this, e, t, !1, n) | |
} | |
, | |
a.prototype.copy = function(e, t, n, r) { | |
if (n || (n = 0), | |
r || 0 === r || (r = this.length), | |
t >= e.length && (t = e.length), | |
t || (t = 0), | |
r > 0 && r < n && (r = n), | |
r === n) | |
return 0; | |
if (0 === e.length || 0 === this.length) | |
return 0; | |
if (t < 0) | |
throw new RangeError("targetStart out of bounds"); | |
if (n < 0 || n >= this.length) | |
throw new RangeError("sourceStart out of bounds"); | |
if (r < 0) | |
throw new RangeError("sourceEnd out of bounds"); | |
r > this.length && (r = this.length), | |
e.length - t < r - n && (r = e.length - t + n); | |
var o, i = r - n; | |
if (this === e && n < t && t < r) | |
for (o = i - 1; o >= 0; --o) | |
e[o + t] = this[o + n]; | |
else if (i < 1e3 || !a.TYPED_ARRAY_SUPPORT) | |
for (o = 0; o < i; ++o) | |
e[o + t] = this[o + n]; | |
else | |
Uint8Array.prototype.set.call(e, this.subarray(n, n + i), t); | |
return i | |
} | |
, | |
a.prototype.fill = function(e, t, n, r) { | |
if ("string" == typeof e) { | |
if ("string" == typeof t ? (r = t, | |
t = 0, | |
n = this.length) : "string" == typeof n && (r = n, | |
n = this.length), | |
1 === e.length) { | |
var o = e.charCodeAt(0); | |
o < 256 && (e = o) | |
} | |
if (void 0 !== r && "string" != typeof r) | |
throw new TypeError("encoding must be a string"); | |
if ("string" == typeof r && !a.isEncoding(r)) | |
throw new TypeError("Unknown encoding: " + r) | |
} else | |
"number" == typeof e && (e &= 255); | |
if (t < 0 || this.length < t || this.length < n) | |
throw new RangeError("Out of range index"); | |
if (n <= t) | |
return this; | |
var i; | |
if (t >>>= 0, | |
n = void 0 === n ? this.length : n >>> 0, | |
e || (e = 0), | |
"number" == typeof e) | |
for (i = t; i < n; ++i) | |
this[i] = e; | |
else { | |
var s = a.isBuffer(e) ? e : B(new a(e,r).toString()) | |
, u = s.length; | |
for (i = 0; i < n - t; ++i) | |
this[i + t] = s[i % u] | |
} | |
return this | |
} | |
; | |
var N = /[^+\/0-9A-Za-z-_]/g; | |
function D(e) { | |
return e < 16 ? "0" + e.toString(16) : e.toString(16) | |
} | |
function B(e, t) { | |
var n; | |
t = t || 1 / 0; | |
for (var r = e.length, o = null, i = [], s = 0; s < r; ++s) { | |
if ((n = e.charCodeAt(s)) > 55295 && n < 57344) { | |
if (!o) { | |
if (n > 56319) { | |
(t -= 3) > -1 && i.push(239, 191, 189); | |
continue | |
} | |
if (s + 1 === r) { | |
(t -= 3) > -1 && i.push(239, 191, 189); | |
continue | |
} | |
o = n; | |
continue | |
} | |
if (n < 56320) { | |
(t -= 3) > -1 && i.push(239, 191, 189), | |
o = n; | |
continue | |
} | |
n = 65536 + (o - 55296 << 10 | n - 56320) | |
} else | |
o && (t -= 3) > -1 && i.push(239, 191, 189); | |
if (o = null, | |
n < 128) { | |
if ((t -= 1) < 0) | |
break; | |
i.push(n) | |
} else if (n < 2048) { | |
if ((t -= 2) < 0) | |
break; | |
i.push(n >> 6 | 192, 63 & n | 128) | |
} else if (n < 65536) { | |
if ((t -= 3) < 0) | |
break; | |
i.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128) | |
} else { | |
if (!(n < 1114112)) | |
throw new Error("Invalid code point"); | |
if ((t -= 4) < 0) | |
break; | |
i.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128) | |
} | |
} | |
return i | |
} | |
function F(e) { | |
return r.toByteArray(function(e) { | |
if ((e = function(e) { | |
return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "") | |
}(e).replace(N, "")).length < 2) | |
return ""; | |
for (; e.length % 4 != 0; ) | |
e += "="; | |
return e | |
}(e)) | |
} | |
function Z(e, t, n, r) { | |
for (var o = 0; o < r && !(o + n >= t.length || o >= e.length); ++o) | |
t[o + n] = e[o]; | |
return o | |
} | |
} | |
).call(this, n("./node_modules/webpack/buildin/global.js")) | |
}, | |
"./node_modules/charenc/charenc.js": function(e, t) { | |
var n = { | |
utf8: { | |
stringToBytes: function(e) { | |
return n.bin.stringToBytes(unescape(encodeURIComponent(e))) | |
}, | |
bytesToString: function(e) { | |
return decodeURIComponent(escape(n.bin.bytesToString(e))) | |
} | |
}, | |
bin: { | |
stringToBytes: function(e) { | |
for (var t = [], n = 0; n < e.length; n++) | |
t.push(255 & e.charCodeAt(n)); | |
return t | |
}, | |
bytesToString: function(e) { | |
for (var t = [], n = 0; n < e.length; n++) | |
t.push(String.fromCharCode(e[n])); | |
return t.join("") | |
} | |
} | |
}; | |
e.exports = n | |
}, | |
"./node_modules/core-js/internals/a-function.js": function(e, t) { | |
e.exports = function(e) { | |
if ("function" != typeof e) | |
throw TypeError(String(e) + " is not a function"); | |
return e | |
} | |
}, | |
"./node_modules/core-js/internals/a-possible-prototype.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/is-object.js"); | |
e.exports = function(e) { | |
if (!r(e) && null !== e) | |
throw TypeError("Can't set " + String(e) + " as a prototype"); | |
return e | |
} | |
}, | |
"./node_modules/core-js/internals/add-to-unscopables.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/well-known-symbol.js") | |
, o = n("./node_modules/core-js/internals/object-create.js") | |
, i = n("./node_modules/core-js/internals/object-define-property.js") | |
, s = r("unscopables") | |
, u = Array.prototype; | |
null == u[s] && i.f(u, s, { | |
configurable: !0, | |
value: o(null) | |
}), | |
e.exports = function(e) { | |
u[s][e] = !0 | |
} | |
}, | |
"./node_modules/core-js/internals/advance-string-index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/string-multibyte.js").charAt; | |
e.exports = function(e, t, n) { | |
return t + (n ? r(e, t).length : 1) | |
} | |
}, | |
"./node_modules/core-js/internals/an-instance.js": function(e, t) { | |
e.exports = function(e, t, n) { | |
if (!(e instanceof t)) | |
throw TypeError("Incorrect " + (n ? n + " " : "") + "invocation"); | |
return e | |
} | |
}, | |
"./node_modules/core-js/internals/an-object.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/is-object.js"); | |
e.exports = function(e) { | |
if (!r(e)) | |
throw TypeError(String(e) + " is not an object"); | |
return e | |
} | |
}, | |
"./node_modules/core-js/internals/array-buffer-native.js": function(e, t) { | |
e.exports = "undefined" != typeof ArrayBuffer && "undefined" != typeof DataView | |
}, | |
"./node_modules/core-js/internals/array-buffer-view-core.js": function(e, t, n) { | |
"use strict"; | |
var r, o = n("./node_modules/core-js/internals/array-buffer-native.js"), i = n("./node_modules/core-js/internals/descriptors.js"), s = n("./node_modules/core-js/internals/global.js"), u = n("./node_modules/core-js/internals/is-object.js"), a = n("./node_modules/core-js/internals/has.js"), c = n("./node_modules/core-js/internals/classof.js"), l = n("./node_modules/core-js/internals/create-non-enumerable-property.js"), f = n("./node_modules/core-js/internals/redefine.js"), d = n("./node_modules/core-js/internals/object-define-property.js").f, h = n("./node_modules/core-js/internals/object-get-prototype-of.js"), p = n("./node_modules/core-js/internals/object-set-prototype-of.js"), v = n("./node_modules/core-js/internals/well-known-symbol.js"), _ = n("./node_modules/core-js/internals/uid.js"), g = s.Int8Array, j = g && g.prototype, m = s.Uint8ClampedArray, y = m && m.prototype, b = g && h(g), E = j && h(j), w = Object.prototype, A = w.isPrototypeOf, C = v("toStringTag"), L = _("TYPED_ARRAY_TAG"), R = o && !!p && "Opera" !== c(s.opera), S = !1, T = { | |
Int8Array: 1, | |
Uint8Array: 1, | |
Uint8ClampedArray: 1, | |
Int16Array: 2, | |
Uint16Array: 2, | |
Int32Array: 4, | |
Uint32Array: 4, | |
Float32Array: 4, | |
Float64Array: 8 | |
}, x = function(e) { | |
return u(e) && a(T, c(e)) | |
}; | |
for (r in T) | |
s[r] || (R = !1); | |
if ((!R || "function" != typeof b || b === Function.prototype) && (b = function() { | |
throw TypeError("Incorrect invocation") | |
} | |
, | |
R)) | |
for (r in T) | |
s[r] && p(s[r], b); | |
if ((!R || !E || E === w) && (E = b.prototype, | |
R)) | |
for (r in T) | |
s[r] && p(s[r].prototype, E); | |
if (R && h(y) !== E && p(y, E), | |
i && !a(E, C)) | |
for (r in S = !0, | |
d(E, C, { | |
get: function() { | |
return u(this) ? this[L] : void 0 | |
} | |
}), | |
T) | |
s[r] && l(s[r], L, r); | |
e.exports = { | |
NATIVE_ARRAY_BUFFER_VIEWS: R, | |
TYPED_ARRAY_TAG: S && L, | |
aTypedArray: function(e) { | |
if (x(e)) | |
return e; | |
throw TypeError("Target is not a typed array") | |
}, | |
aTypedArrayConstructor: function(e) { | |
if (p) { | |
if (A.call(b, e)) | |
return e | |
} else | |
for (var t in T) | |
if (a(T, r)) { | |
var n = s[t]; | |
if (n && (e === n || A.call(n, e))) | |
return e | |
} | |
throw TypeError("Target is not a typed array constructor") | |
}, | |
exportTypedArrayMethod: function(e, t, n) { | |
if (i) { | |
if (n) | |
for (var r in T) { | |
var o = s[r]; | |
o && a(o.prototype, e) && delete o.prototype[e] | |
} | |
E[e] && !n || f(E, e, n ? t : R && j[e] || t) | |
} | |
}, | |
exportTypedArrayStaticMethod: function(e, t, n) { | |
var r, o; | |
if (i) { | |
if (p) { | |
if (n) | |
for (r in T) | |
(o = s[r]) && a(o, e) && delete o[e]; | |
if (b[e] && !n) | |
return; | |
try { | |
return f(b, e, n ? t : R && g[e] || t) | |
} catch (e) {} | |
} | |
for (r in T) | |
!(o = s[r]) || o[e] && !n || f(o, e, t) | |
} | |
}, | |
isView: function(e) { | |
var t = c(e); | |
return "DataView" === t || a(T, t) | |
}, | |
isTypedArray: x, | |
TypedArray: b, | |
TypedArrayPrototype: E | |
} | |
}, | |
"./node_modules/core-js/internals/array-buffer.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/descriptors.js") | |
, i = n("./node_modules/core-js/internals/array-buffer-native.js") | |
, s = n("./node_modules/core-js/internals/create-non-enumerable-property.js") | |
, u = n("./node_modules/core-js/internals/redefine-all.js") | |
, a = n("./node_modules/core-js/internals/fails.js") | |
, c = n("./node_modules/core-js/internals/an-instance.js") | |
, l = n("./node_modules/core-js/internals/to-integer.js") | |
, f = n("./node_modules/core-js/internals/to-length.js") | |
, d = n("./node_modules/core-js/internals/to-index.js") | |
, h = n("./node_modules/core-js/internals/ieee754.js") | |
, p = n("./node_modules/core-js/internals/object-get-prototype-of.js") | |
, v = n("./node_modules/core-js/internals/object-set-prototype-of.js") | |
, _ = n("./node_modules/core-js/internals/object-get-own-property-names.js").f | |
, g = n("./node_modules/core-js/internals/object-define-property.js").f | |
, j = n("./node_modules/core-js/internals/array-fill.js") | |
, m = n("./node_modules/core-js/internals/set-to-string-tag.js") | |
, y = n("./node_modules/core-js/internals/internal-state.js") | |
, b = y.get | |
, E = y.set | |
, w = r.ArrayBuffer | |
, A = w | |
, C = r.DataView | |
, L = C && C.prototype | |
, R = Object.prototype | |
, S = r.RangeError | |
, T = h.pack | |
, x = h.unpack | |
, I = function(e) { | |
return [255 & e] | |
} | |
, O = function(e) { | |
return [255 & e, e >> 8 & 255] | |
} | |
, U = function(e) { | |
return [255 & e, e >> 8 & 255, e >> 16 & 255, e >> 24 & 255] | |
} | |
, M = function(e) { | |
return e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0] | |
} | |
, Q = function(e) { | |
return T(e, 23, 4) | |
} | |
, k = function(e) { | |
return T(e, 52, 8) | |
} | |
, P = function(e, t) { | |
g(e.prototype, t, { | |
get: function() { | |
return b(this)[t] | |
} | |
}) | |
} | |
, N = function(e, t, n, r) { | |
var o = d(n) | |
, i = b(e); | |
if (o + t > i.byteLength) | |
throw S("Wrong index"); | |
var s = b(i.buffer).bytes | |
, u = o + i.byteOffset | |
, a = s.slice(u, u + t); | |
return r ? a : a.reverse() | |
} | |
, D = function(e, t, n, r, o, i) { | |
var s = d(n) | |
, u = b(e); | |
if (s + t > u.byteLength) | |
throw S("Wrong index"); | |
for (var a = b(u.buffer).bytes, c = s + u.byteOffset, l = r(+o), f = 0; f < t; f++) | |
a[c + f] = l[i ? f : t - f - 1] | |
}; | |
if (i) { | |
if (!a((function() { | |
w(1) | |
} | |
)) || !a((function() { | |
new w(-1) | |
} | |
)) || a((function() { | |
return new w, | |
new w(1.5), | |
new w(NaN), | |
"ArrayBuffer" != w.name | |
} | |
))) { | |
for (var B, F = (A = function(e) { | |
return c(this, A), | |
new w(d(e)) | |
} | |
).prototype = w.prototype, Z = _(w), Y = 0; Z.length > Y; ) | |
(B = Z[Y++])in A || s(A, B, w[B]); | |
F.constructor = A | |
} | |
v && p(L) !== R && v(L, R); | |
var K = new C(new A(2)) | |
, W = L.setInt8; | |
K.setInt8(0, 2147483648), | |
K.setInt8(1, 2147483649), | |
!K.getInt8(0) && K.getInt8(1) || u(L, { | |
setInt8: function(e, t) { | |
W.call(this, e, t << 24 >> 24) | |
}, | |
setUint8: function(e, t) { | |
W.call(this, e, t << 24 >> 24) | |
} | |
}, { | |
unsafe: !0 | |
}) | |
} else | |
A = function(e) { | |
c(this, A, "ArrayBuffer"); | |
var t = d(e); | |
E(this, { | |
bytes: j.call(new Array(t), 0), | |
byteLength: t | |
}), | |
o || (this.byteLength = t) | |
} | |
, | |
C = function(e, t, n) { | |
c(this, C, "DataView"), | |
c(e, A, "DataView"); | |
var r = b(e).byteLength | |
, i = l(t); | |
if (i < 0 || i > r) | |
throw S("Wrong offset"); | |
if (i + (n = void 0 === n ? r - i : f(n)) > r) | |
throw S("Wrong length"); | |
E(this, { | |
buffer: e, | |
byteLength: n, | |
byteOffset: i | |
}), | |
o || (this.buffer = e, | |
this.byteLength = n, | |
this.byteOffset = i) | |
} | |
, | |
o && (P(A, "byteLength"), | |
P(C, "buffer"), | |
P(C, "byteLength"), | |
P(C, "byteOffset")), | |
u(C.prototype, { | |
getInt8: function(e) { | |
return N(this, 1, e)[0] << 24 >> 24 | |
}, | |
getUint8: function(e) { | |
return N(this, 1, e)[0] | |
}, | |
getInt16: function(e) { | |
var t = N(this, 2, e, arguments.length > 1 ? arguments[1] : void 0); | |
return (t[1] << 8 | t[0]) << 16 >> 16 | |
}, | |
getUint16: function(e) { | |
var t = N(this, 2, e, arguments.length > 1 ? arguments[1] : void 0); | |
return t[1] << 8 | t[0] | |
}, | |
getInt32: function(e) { | |
return M(N(this, 4, e, arguments.length > 1 ? arguments[1] : void 0)) | |
}, | |
getUint32: function(e) { | |
return M(N(this, 4, e, arguments.length > 1 ? arguments[1] : void 0)) >>> 0 | |
}, | |
getFloat32: function(e) { | |
return x(N(this, 4, e, arguments.length > 1 ? arguments[1] : void 0), 23) | |
}, | |
getFloat64: function(e) { | |
return x(N(this, 8, e, arguments.length > 1 ? arguments[1] : void 0), 52) | |
}, | |
setInt8: function(e, t) { | |
D(this, 1, e, I, t) | |
}, | |
setUint8: function(e, t) { | |
D(this, 1, e, I, t) | |
}, | |
setInt16: function(e, t) { | |
D(this, 2, e, O, t, arguments.length > 2 ? arguments[2] : void 0) | |
}, | |
setUint16: function(e, t) { | |
D(this, 2, e, O, t, arguments.length > 2 ? arguments[2] : void 0) | |
}, | |
setInt32: function(e, t) { | |
D(this, 4, e, U, t, arguments.length > 2 ? arguments[2] : void 0) | |
}, | |
setUint32: function(e, t) { | |
D(this, 4, e, U, t, arguments.length > 2 ? arguments[2] : void 0) | |
}, | |
setFloat32: function(e, t) { | |
D(this, 4, e, Q, t, arguments.length > 2 ? arguments[2] : void 0) | |
}, | |
setFloat64: function(e, t) { | |
D(this, 8, e, k, t, arguments.length > 2 ? arguments[2] : void 0) | |
} | |
}); | |
m(A, "ArrayBuffer"), | |
m(C, "DataView"), | |
e.exports = { | |
ArrayBuffer: A, | |
DataView: C | |
} | |
}, | |
"./node_modules/core-js/internals/array-fill.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/to-object.js") | |
, o = n("./node_modules/core-js/internals/to-absolute-index.js") | |
, i = n("./node_modules/core-js/internals/to-length.js"); | |
e.exports = function(e) { | |
for (var t = r(this), n = i(t.length), s = arguments.length, u = o(s > 1 ? arguments[1] : void 0, n), a = s > 2 ? arguments[2] : void 0, c = void 0 === a ? n : o(a, n); c > u; ) | |
t[u++] = e; | |
return t | |
} | |
}, | |
"./node_modules/core-js/internals/array-from.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/function-bind-context.js") | |
, o = n("./node_modules/core-js/internals/to-object.js") | |
, i = n("./node_modules/core-js/internals/call-with-safe-iteration-closing.js") | |
, s = n("./node_modules/core-js/internals/is-array-iterator-method.js") | |
, u = n("./node_modules/core-js/internals/to-length.js") | |
, a = n("./node_modules/core-js/internals/create-property.js") | |
, c = n("./node_modules/core-js/internals/get-iterator-method.js"); | |
e.exports = function(e) { | |
var t, n, l, f, d, h, p = o(e), v = "function" == typeof this ? this : Array, _ = arguments.length, g = _ > 1 ? arguments[1] : void 0, j = void 0 !== g, m = c(p), y = 0; | |
if (j && (g = r(g, _ > 2 ? arguments[2] : void 0, 2)), | |
null == m || v == Array && s(m)) | |
for (n = new v(t = u(p.length)); t > y; y++) | |
h = j ? g(p[y], y) : p[y], | |
a(n, y, h); | |
else | |
for (d = (f = m.call(p)).next, | |
n = new v; !(l = d.call(f)).done; y++) | |
h = j ? i(f, g, [l.value, y], !0) : l.value, | |
a(n, y, h); | |
return n.length = y, | |
n | |
} | |
}, | |
"./node_modules/core-js/internals/array-includes.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-indexed-object.js") | |
, o = n("./node_modules/core-js/internals/to-length.js") | |
, i = n("./node_modules/core-js/internals/to-absolute-index.js") | |
, s = function(e) { | |
return function(t, n, s) { | |
var u, a = r(t), c = o(a.length), l = i(s, c); | |
if (e && n != n) { | |
for (; c > l; ) | |
if ((u = a[l++]) != u) | |
return !0 | |
} else | |
for (; c > l; l++) | |
if ((e || l in a) && a[l] === n) | |
return e || l || 0; | |
return !e && -1 | |
} | |
}; | |
e.exports = { | |
includes: s(!0), | |
indexOf: s(!1) | |
} | |
}, | |
"./node_modules/core-js/internals/array-iteration.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/function-bind-context.js") | |
, o = n("./node_modules/core-js/internals/indexed-object.js") | |
, i = n("./node_modules/core-js/internals/to-object.js") | |
, s = n("./node_modules/core-js/internals/to-length.js") | |
, u = n("./node_modules/core-js/internals/array-species-create.js") | |
, a = [].push | |
, c = function(e) { | |
var t = 1 == e | |
, n = 2 == e | |
, c = 3 == e | |
, l = 4 == e | |
, f = 6 == e | |
, d = 5 == e || f; | |
return function(h, p, v, _) { | |
for (var g, j, m = i(h), y = o(m), b = r(p, v, 3), E = s(y.length), w = 0, A = _ || u, C = t ? A(h, E) : n ? A(h, 0) : void 0; E > w; w++) | |
if ((d || w in y) && (j = b(g = y[w], w, m), | |
e)) | |
if (t) | |
C[w] = j; | |
else if (j) | |
switch (e) { | |
case 3: | |
return !0; | |
case 5: | |
return g; | |
case 6: | |
return w; | |
case 2: | |
a.call(C, g) | |
} | |
else if (l) | |
return !1; | |
return f ? -1 : c || l ? l : C | |
} | |
}; | |
e.exports = { | |
forEach: c(0), | |
map: c(1), | |
filter: c(2), | |
some: c(3), | |
every: c(4), | |
find: c(5), | |
findIndex: c(6) | |
} | |
}, | |
"./node_modules/core-js/internals/array-method-is-strict.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/fails.js"); | |
e.exports = function(e, t) { | |
var n = [][e]; | |
return !!n && r((function() { | |
n.call(null, t || function() { | |
throw 1 | |
} | |
, 1) | |
} | |
)) | |
} | |
}, | |
"./node_modules/core-js/internals/array-method-uses-to-length.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/descriptors.js") | |
, o = n("./node_modules/core-js/internals/fails.js") | |
, i = n("./node_modules/core-js/internals/has.js") | |
, s = Object.defineProperty | |
, u = {} | |
, a = function(e) { | |
throw e | |
}; | |
e.exports = function(e, t) { | |
if (i(u, e)) | |
return u[e]; | |
t || (t = {}); | |
var n = [][e] | |
, c = !!i(t, "ACCESSORS") && t.ACCESSORS | |
, l = i(t, 0) ? t[0] : a | |
, f = i(t, 1) ? t[1] : void 0; | |
return u[e] = !!n && !o((function() { | |
if (c && !r) | |
return !0; | |
var e = { | |
length: -1 | |
}; | |
c ? s(e, 1, { | |
enumerable: !0, | |
get: a | |
}) : e[1] = 1, | |
n.call(e, l, f) | |
} | |
)) | |
} | |
}, | |
"./node_modules/core-js/internals/array-reduce.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/a-function.js") | |
, o = n("./node_modules/core-js/internals/to-object.js") | |
, i = n("./node_modules/core-js/internals/indexed-object.js") | |
, s = n("./node_modules/core-js/internals/to-length.js") | |
, u = function(e) { | |
return function(t, n, u, a) { | |
r(n); | |
var c = o(t) | |
, l = i(c) | |
, f = s(c.length) | |
, d = e ? f - 1 : 0 | |
, h = e ? -1 : 1; | |
if (u < 2) | |
for (; ; ) { | |
if (d in l) { | |
a = l[d], | |
d += h; | |
break | |
} | |
if (d += h, | |
e ? d < 0 : f <= d) | |
throw TypeError("Reduce of empty array with no initial value") | |
} | |
for (; e ? d >= 0 : f > d; d += h) | |
d in l && (a = n(a, l[d], d, c)); | |
return a | |
} | |
}; | |
e.exports = { | |
left: u(!1), | |
right: u(!0) | |
} | |
}, | |
"./node_modules/core-js/internals/array-species-create.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/is-object.js") | |
, o = n("./node_modules/core-js/internals/is-array.js") | |
, i = n("./node_modules/core-js/internals/well-known-symbol.js")("species"); | |
e.exports = function(e, t) { | |
var n; | |
return o(e) && ("function" != typeof (n = e.constructor) || n !== Array && !o(n.prototype) ? r(n) && null === (n = n[i]) && (n = void 0) : n = void 0), | |
new (void 0 === n ? Array : n)(0 === t ? 0 : t) | |
} | |
}, | |
"./node_modules/core-js/internals/call-with-safe-iteration-closing.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/an-object.js"); | |
e.exports = function(e, t, n, o) { | |
try { | |
return o ? t(r(n)[0], n[1]) : t(n) | |
} catch (t) { | |
var i = e.return; | |
throw void 0 !== i && r(i.call(e)), | |
t | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/check-correctness-of-iteration.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/well-known-symbol.js")("iterator") | |
, o = !1; | |
try { | |
var i = 0 | |
, s = { | |
next: function() { | |
return { | |
done: !!i++ | |
} | |
}, | |
return: function() { | |
o = !0 | |
} | |
}; | |
s[r] = function() { | |
return this | |
} | |
, | |
Array.from(s, (function() { | |
throw 2 | |
} | |
)) | |
} catch (e) {} | |
e.exports = function(e, t) { | |
if (!t && !o) | |
return !1; | |
var n = !1; | |
try { | |
var i = {}; | |
i[r] = function() { | |
return { | |
next: function() { | |
return { | |
done: n = !0 | |
} | |
} | |
} | |
} | |
, | |
e(i) | |
} catch (e) {} | |
return n | |
} | |
}, | |
"./node_modules/core-js/internals/classof-raw.js": function(e, t) { | |
var n = {}.toString; | |
e.exports = function(e) { | |
return n.call(e).slice(8, -1) | |
} | |
}, | |
"./node_modules/core-js/internals/classof.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-string-tag-support.js") | |
, o = n("./node_modules/core-js/internals/classof-raw.js") | |
, i = n("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag") | |
, s = "Arguments" == o(function() { | |
return arguments | |
}()); | |
e.exports = r ? o : function(e) { | |
var t, n, r; | |
return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof (n = function(e, t) { | |
try { | |
return e[t] | |
} catch (e) {} | |
}(t = Object(e), i)) ? n : s ? o(t) : "Object" == (r = o(t)) && "function" == typeof t.callee ? "Arguments" : r | |
} | |
}, | |
"./node_modules/core-js/internals/copy-constructor-properties.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/has.js") | |
, o = n("./node_modules/core-js/internals/own-keys.js") | |
, i = n("./node_modules/core-js/internals/object-get-own-property-descriptor.js") | |
, s = n("./node_modules/core-js/internals/object-define-property.js"); | |
e.exports = function(e, t) { | |
for (var n = o(t), u = s.f, a = i.f, c = 0; c < n.length; c++) { | |
var l = n[c]; | |
r(e, l) || u(e, l, a(t, l)) | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/correct-prototype-getter.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/fails.js"); | |
e.exports = !r((function() { | |
function e() {} | |
return e.prototype.constructor = null, | |
Object.getPrototypeOf(new e) !== e.prototype | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/create-iterator-constructor.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype | |
, o = n("./node_modules/core-js/internals/object-create.js") | |
, i = n("./node_modules/core-js/internals/create-property-descriptor.js") | |
, s = n("./node_modules/core-js/internals/set-to-string-tag.js") | |
, u = n("./node_modules/core-js/internals/iterators.js") | |
, a = function() { | |
return this | |
}; | |
e.exports = function(e, t, n) { | |
var c = t + " Iterator"; | |
return e.prototype = o(r, { | |
next: i(1, n) | |
}), | |
s(e, c, !1, !0), | |
u[c] = a, | |
e | |
} | |
}, | |
"./node_modules/core-js/internals/create-non-enumerable-property.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/descriptors.js") | |
, o = n("./node_modules/core-js/internals/object-define-property.js") | |
, i = n("./node_modules/core-js/internals/create-property-descriptor.js"); | |
e.exports = r ? function(e, t, n) { | |
return o.f(e, t, i(1, n)) | |
} | |
: function(e, t, n) { | |
return e[t] = n, | |
e | |
} | |
}, | |
"./node_modules/core-js/internals/create-property-descriptor.js": function(e, t) { | |
e.exports = function(e, t) { | |
return { | |
enumerable: !(1 & e), | |
configurable: !(2 & e), | |
writable: !(4 & e), | |
value: t | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/create-property.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/to-primitive.js") | |
, o = n("./node_modules/core-js/internals/object-define-property.js") | |
, i = n("./node_modules/core-js/internals/create-property-descriptor.js"); | |
e.exports = function(e, t, n) { | |
var s = r(t); | |
s in e ? o.f(e, s, i(0, n)) : e[s] = n | |
} | |
}, | |
"./node_modules/core-js/internals/define-iterator.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/export.js") | |
, o = n("./node_modules/core-js/internals/create-iterator-constructor.js") | |
, i = n("./node_modules/core-js/internals/object-get-prototype-of.js") | |
, s = n("./node_modules/core-js/internals/object-set-prototype-of.js") | |
, u = n("./node_modules/core-js/internals/set-to-string-tag.js") | |
, a = n("./node_modules/core-js/internals/create-non-enumerable-property.js") | |
, c = n("./node_modules/core-js/internals/redefine.js") | |
, l = n("./node_modules/core-js/internals/well-known-symbol.js") | |
, f = n("./node_modules/core-js/internals/is-pure.js") | |
, d = n("./node_modules/core-js/internals/iterators.js") | |
, h = n("./node_modules/core-js/internals/iterators-core.js") | |
, p = h.IteratorPrototype | |
, v = h.BUGGY_SAFARI_ITERATORS | |
, _ = l("iterator") | |
, g = function() { | |
return this | |
}; | |
e.exports = function(e, t, n, l, h, j, m) { | |
o(n, t, l); | |
var y, b, E, w = function(e) { | |
if (e === h && S) | |
return S; | |
if (!v && e in L) | |
return L[e]; | |
switch (e) { | |
case "keys": | |
case "values": | |
case "entries": | |
return function() { | |
return new n(this,e) | |
} | |
} | |
return function() { | |
return new n(this) | |
} | |
}, A = t + " Iterator", C = !1, L = e.prototype, R = L[_] || L["@@iterator"] || h && L[h], S = !v && R || w(h), T = "Array" == t && L.entries || R; | |
if (T && (y = i(T.call(new e)), | |
p !== Object.prototype && y.next && (f || i(y) === p || (s ? s(y, p) : "function" != typeof y[_] && a(y, _, g)), | |
u(y, A, !0, !0), | |
f && (d[A] = g))), | |
"values" == h && R && "values" !== R.name && (C = !0, | |
S = function() { | |
return R.call(this) | |
} | |
), | |
f && !m || L[_] === S || a(L, _, S), | |
d[t] = S, | |
h) | |
if (b = { | |
values: w("values"), | |
keys: j ? S : w("keys"), | |
entries: w("entries") | |
}, | |
m) | |
for (E in b) | |
(v || C || !(E in L)) && c(L, E, b[E]); | |
else | |
r({ | |
target: t, | |
proto: !0, | |
forced: v || C | |
}, b); | |
return b | |
} | |
}, | |
"./node_modules/core-js/internals/descriptors.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/fails.js"); | |
e.exports = !r((function() { | |
return 7 != Object.defineProperty({}, 1, { | |
get: function() { | |
return 7 | |
} | |
})[1] | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/document-create-element.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/is-object.js") | |
, i = r.document | |
, s = o(i) && o(i.createElement); | |
e.exports = function(e) { | |
return s ? i.createElement(e) : {} | |
} | |
}, | |
"./node_modules/core-js/internals/enum-bug-keys.js": function(e, t) { | |
e.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"] | |
}, | |
"./node_modules/core-js/internals/export.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f | |
, i = n("./node_modules/core-js/internals/create-non-enumerable-property.js") | |
, s = n("./node_modules/core-js/internals/redefine.js") | |
, u = n("./node_modules/core-js/internals/set-global.js") | |
, a = n("./node_modules/core-js/internals/copy-constructor-properties.js") | |
, c = n("./node_modules/core-js/internals/is-forced.js"); | |
e.exports = function(e, t) { | |
var n, l, f, d, h, p = e.target, v = e.global, _ = e.stat; | |
if (n = v ? r : _ ? r[p] || u(p, {}) : (r[p] || {}).prototype) | |
for (l in t) { | |
if (d = t[l], | |
f = e.noTargetGet ? (h = o(n, l)) && h.value : n[l], | |
!c(v ? l : p + (_ ? "." : "#") + l, e.forced) && void 0 !== f) { | |
if (typeof d == typeof f) | |
continue; | |
a(d, f) | |
} | |
(e.sham || f && f.sham) && i(d, "sham", !0), | |
s(n, l, d, e) | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/fails.js": function(e, t) { | |
e.exports = function(e) { | |
try { | |
return !!e() | |
} catch (e) { | |
return !0 | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js": function(e, t, n) { | |
"use strict"; | |
n("./node_modules/core-js/modules/es.regexp.exec.js"); | |
var r = n("./node_modules/core-js/internals/redefine.js") | |
, o = n("./node_modules/core-js/internals/fails.js") | |
, i = n("./node_modules/core-js/internals/well-known-symbol.js") | |
, s = n("./node_modules/core-js/internals/regexp-exec.js") | |
, u = n("./node_modules/core-js/internals/create-non-enumerable-property.js") | |
, a = i("species") | |
, c = !o((function() { | |
var e = /./; | |
return e.exec = function() { | |
var e = []; | |
return e.groups = { | |
a: "7" | |
}, | |
e | |
} | |
, | |
"7" !== "".replace(e, "$<a>") | |
} | |
)) | |
, l = "$0" === "a".replace(/./, "$0") | |
, f = i("replace") | |
, d = !!/./[f] && "" === /./[f]("a", "$0") | |
, h = !o((function() { | |
var e = /(?:)/ | |
, t = e.exec; | |
e.exec = function() { | |
return t.apply(this, arguments) | |
} | |
; | |
var n = "ab".split(e); | |
return 2 !== n.length || "a" !== n[0] || "b" !== n[1] | |
} | |
)); | |
e.exports = function(e, t, n, f) { | |
var p = i(e) | |
, v = !o((function() { | |
var t = {}; | |
return t[p] = function() { | |
return 7 | |
} | |
, | |
7 != ""[e](t) | |
} | |
)) | |
, _ = v && !o((function() { | |
var t = !1 | |
, n = /a/; | |
return "split" === e && ((n = {}).constructor = {}, | |
n.constructor[a] = function() { | |
return n | |
} | |
, | |
n.flags = "", | |
n[p] = /./[p]), | |
n.exec = function() { | |
return t = !0, | |
null | |
} | |
, | |
n[p](""), | |
!t | |
} | |
)); | |
if (!v || !_ || "replace" === e && (!c || !l || d) || "split" === e && !h) { | |
var g = /./[p] | |
, j = n(p, ""[e], (function(e, t, n, r, o) { | |
return t.exec === s ? v && !o ? { | |
done: !0, | |
value: g.call(t, n, r) | |
} : { | |
done: !0, | |
value: e.call(n, t, r) | |
} : { | |
done: !1 | |
} | |
} | |
), { | |
REPLACE_KEEPS_$0: l, | |
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: d | |
}) | |
, m = j[0] | |
, y = j[1]; | |
r(String.prototype, e, m), | |
r(RegExp.prototype, p, 2 == t ? function(e, t) { | |
return y.call(e, this, t) | |
} | |
: function(e) { | |
return y.call(e, this) | |
} | |
) | |
} | |
f && u(RegExp.prototype[p], "sham", !0) | |
} | |
}, | |
"./node_modules/core-js/internals/function-bind-context.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/a-function.js"); | |
e.exports = function(e, t, n) { | |
if (r(e), | |
void 0 === t) | |
return e; | |
switch (n) { | |
case 0: | |
return function() { | |
return e.call(t) | |
} | |
; | |
case 1: | |
return function(n) { | |
return e.call(t, n) | |
} | |
; | |
case 2: | |
return function(n, r) { | |
return e.call(t, n, r) | |
} | |
; | |
case 3: | |
return function(n, r, o) { | |
return e.call(t, n, r, o) | |
} | |
} | |
return function() { | |
return e.apply(t, arguments) | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/get-built-in.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/path.js") | |
, o = n("./node_modules/core-js/internals/global.js") | |
, i = function(e) { | |
return "function" == typeof e ? e : void 0 | |
}; | |
e.exports = function(e, t) { | |
return arguments.length < 2 ? i(r[e]) || i(o[e]) : r[e] && r[e][t] || o[e] && o[e][t] | |
} | |
}, | |
"./node_modules/core-js/internals/get-iterator-method.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/classof.js") | |
, o = n("./node_modules/core-js/internals/iterators.js") | |
, i = n("./node_modules/core-js/internals/well-known-symbol.js")("iterator"); | |
e.exports = function(e) { | |
if (null != e) | |
return e[i] || e["@@iterator"] || o[r(e)] | |
} | |
}, | |
"./node_modules/core-js/internals/get-iterator.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/an-object.js") | |
, o = n("./node_modules/core-js/internals/get-iterator-method.js"); | |
e.exports = function(e) { | |
var t = o(e); | |
if ("function" != typeof t) | |
throw TypeError(String(e) + " is not iterable"); | |
return r(t.call(e)) | |
} | |
}, | |
"./node_modules/core-js/internals/global.js": function(e, t, n) { | |
(function(t) { | |
var n = function(e) { | |
return e && e.Math == Math && e | |
}; | |
e.exports = n("object" == typeof globalThis && globalThis) || n("object" == typeof window && window) || n("object" == typeof self && self) || n("object" == typeof t && t) || Function("return this")() | |
} | |
).call(this, n("./node_modules/webpack/buildin/global.js")) | |
}, | |
"./node_modules/core-js/internals/has.js": function(e, t) { | |
var n = {}.hasOwnProperty; | |
e.exports = function(e, t) { | |
return n.call(e, t) | |
} | |
}, | |
"./node_modules/core-js/internals/hidden-keys.js": function(e, t) { | |
e.exports = {} | |
}, | |
"./node_modules/core-js/internals/html.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/get-built-in.js"); | |
e.exports = r("document", "documentElement") | |
}, | |
"./node_modules/core-js/internals/ie8-dom-define.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/descriptors.js") | |
, o = n("./node_modules/core-js/internals/fails.js") | |
, i = n("./node_modules/core-js/internals/document-create-element.js"); | |
e.exports = !r && !o((function() { | |
return 7 != Object.defineProperty(i("div"), "a", { | |
get: function() { | |
return 7 | |
} | |
}).a | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/ieee754.js": function(e, t) { | |
var n = Math.abs | |
, r = Math.pow | |
, o = Math.floor | |
, i = Math.log | |
, s = Math.LN2; | |
e.exports = { | |
pack: function(e, t, u) { | |
var a, c, l, f = new Array(u), d = 8 * u - t - 1, h = (1 << d) - 1, p = h >> 1, v = 23 === t ? r(2, -24) - r(2, -77) : 0, _ = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0, g = 0; | |
for ((e = n(e)) != e || e === 1 / 0 ? (c = e != e ? 1 : 0, | |
a = h) : (a = o(i(e) / s), | |
e * (l = r(2, -a)) < 1 && (a--, | |
l *= 2), | |
(e += a + p >= 1 ? v / l : v * r(2, 1 - p)) * l >= 2 && (a++, | |
l /= 2), | |
a + p >= h ? (c = 0, | |
a = h) : a + p >= 1 ? (c = (e * l - 1) * r(2, t), | |
a += p) : (c = e * r(2, p - 1) * r(2, t), | |
a = 0)); t >= 8; f[g++] = 255 & c, | |
c /= 256, | |
t -= 8) | |
; | |
for (a = a << t | c, | |
d += t; d > 0; f[g++] = 255 & a, | |
a /= 256, | |
d -= 8) | |
; | |
return f[--g] |= 128 * _, | |
f | |
}, | |
unpack: function(e, t) { | |
var n, o = e.length, i = 8 * o - t - 1, s = (1 << i) - 1, u = s >> 1, a = i - 7, c = o - 1, l = e[c--], f = 127 & l; | |
for (l >>= 7; a > 0; f = 256 * f + e[c], | |
c--, | |
a -= 8) | |
; | |
for (n = f & (1 << -a) - 1, | |
f >>= -a, | |
a += t; a > 0; n = 256 * n + e[c], | |
c--, | |
a -= 8) | |
; | |
if (0 === f) | |
f = 1 - u; | |
else { | |
if (f === s) | |
return n ? NaN : l ? -1 / 0 : 1 / 0; | |
n += r(2, t), | |
f -= u | |
} | |
return (l ? -1 : 1) * n * r(2, f - t) | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/indexed-object.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/fails.js") | |
, o = n("./node_modules/core-js/internals/classof-raw.js") | |
, i = "".split; | |
e.exports = r((function() { | |
return !Object("z").propertyIsEnumerable(0) | |
} | |
)) ? function(e) { | |
return "String" == o(e) ? i.call(e, "") : Object(e) | |
} | |
: Object | |
}, | |
"./node_modules/core-js/internals/inherit-if-required.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/is-object.js") | |
, o = n("./node_modules/core-js/internals/object-set-prototype-of.js"); | |
e.exports = function(e, t, n) { | |
var i, s; | |
return o && "function" == typeof (i = t.constructor) && i !== n && r(s = i.prototype) && s !== n.prototype && o(e, s), | |
e | |
} | |
}, | |
"./node_modules/core-js/internals/inspect-source.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/shared-store.js") | |
, o = Function.toString; | |
"function" != typeof r.inspectSource && (r.inspectSource = function(e) { | |
return o.call(e) | |
} | |
), | |
e.exports = r.inspectSource | |
}, | |
"./node_modules/core-js/internals/internal-state.js": function(e, t, n) { | |
var r, o, i, s = n("./node_modules/core-js/internals/native-weak-map.js"), u = n("./node_modules/core-js/internals/global.js"), a = n("./node_modules/core-js/internals/is-object.js"), c = n("./node_modules/core-js/internals/create-non-enumerable-property.js"), l = n("./node_modules/core-js/internals/has.js"), f = n("./node_modules/core-js/internals/shared-key.js"), d = n("./node_modules/core-js/internals/hidden-keys.js"), h = u.WeakMap; | |
if (s) { | |
var p = new h | |
, v = p.get | |
, _ = p.has | |
, g = p.set; | |
r = function(e, t) { | |
return g.call(p, e, t), | |
t | |
} | |
, | |
o = function(e) { | |
return v.call(p, e) || {} | |
} | |
, | |
i = function(e) { | |
return _.call(p, e) | |
} | |
} else { | |
var j = f("state"); | |
d[j] = !0, | |
r = function(e, t) { | |
return c(e, j, t), | |
t | |
} | |
, | |
o = function(e) { | |
return l(e, j) ? e[j] : {} | |
} | |
, | |
i = function(e) { | |
return l(e, j) | |
} | |
} | |
e.exports = { | |
set: r, | |
get: o, | |
has: i, | |
enforce: function(e) { | |
return i(e) ? o(e) : r(e, {}) | |
}, | |
getterFor: function(e) { | |
return function(t) { | |
var n; | |
if (!a(t) || (n = o(t)).type !== e) | |
throw TypeError("Incompatible receiver, " + e + " required"); | |
return n | |
} | |
} | |
} | |
}, | |
"./node_modules/core-js/internals/is-array-iterator-method.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/well-known-symbol.js") | |
, o = n("./node_modules/core-js/internals/iterators.js") | |
, i = r("iterator") | |
, s = Array.prototype; | |
e.exports = function(e) { | |
return void 0 !== e && (o.Array === e || s[i] === e) | |
} | |
}, | |
"./node_modules/core-js/internals/is-array.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/classof-raw.js"); | |
e.exports = Array.isArray || function(e) { | |
return "Array" == r(e) | |
} | |
}, | |
"./node_modules/core-js/internals/is-forced.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/fails.js") | |
, o = /#|\.prototype\./ | |
, i = function(e, t) { | |
var n = u[s(e)]; | |
return n == c || n != a && ("function" == typeof t ? r(t) : !!t) | |
} | |
, s = i.normalize = function(e) { | |
return String(e).replace(o, ".").toLowerCase() | |
} | |
, u = i.data = {} | |
, a = i.NATIVE = "N" | |
, c = i.POLYFILL = "P"; | |
e.exports = i | |
}, | |
"./node_modules/core-js/internals/is-object.js": function(e, t) { | |
e.exports = function(e) { | |
return "object" == typeof e ? null !== e : "function" == typeof e | |
} | |
}, | |
"./node_modules/core-js/internals/is-pure.js": function(e, t) { | |
e.exports = !1 | |
}, | |
"./node_modules/core-js/internals/iterators-core.js": function(e, t, n) { | |
"use strict"; | |
var r, o, i, s = n("./node_modules/core-js/internals/object-get-prototype-of.js"), u = n("./node_modules/core-js/internals/create-non-enumerable-property.js"), a = n("./node_modules/core-js/internals/has.js"), c = n("./node_modules/core-js/internals/well-known-symbol.js"), l = n("./node_modules/core-js/internals/is-pure.js"), f = c("iterator"), d = !1; | |
[].keys && ("next"in (i = [].keys()) ? (o = s(s(i))) !== Object.prototype && (r = o) : d = !0), | |
null == r && (r = {}), | |
l || a(r, f) || u(r, f, (function() { | |
return this | |
} | |
)), | |
e.exports = { | |
IteratorPrototype: r, | |
BUGGY_SAFARI_ITERATORS: d | |
} | |
}, | |
"./node_modules/core-js/internals/iterators.js": function(e, t) { | |
e.exports = {} | |
}, | |
"./node_modules/core-js/internals/native-symbol.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/fails.js"); | |
e.exports = !!Object.getOwnPropertySymbols && !r((function() { | |
return !String(Symbol()) | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/native-url.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/fails.js") | |
, o = n("./node_modules/core-js/internals/well-known-symbol.js") | |
, i = n("./node_modules/core-js/internals/is-pure.js") | |
, s = o("iterator"); | |
e.exports = !r((function() { | |
var e = new URL("b?a=1&b=2&c=3","http://a") | |
, t = e.searchParams | |
, n = ""; | |
return e.pathname = "c%20d", | |
t.forEach((function(e, r) { | |
t.delete("b"), | |
n += r + e | |
} | |
)), | |
i && !e.toJSON || !t.sort || "http://a/c%20d?a=1&c=3" !== e.href || "3" !== t.get("c") || "a=1" !== String(new URLSearchParams("?a=1")) || !t[s] || "a" !== new URL("https://a@b").username || "b" !== new URLSearchParams(new URLSearchParams("a=b")).get("a") || "xn--e1aybc" !== new URL("http://тест").host || "#%D0%B1" !== new URL("http://a#б").hash || "a1c3" !== n || "x" !== new URL("http://x",void 0).host | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/native-weak-map.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/inspect-source.js") | |
, i = r.WeakMap; | |
e.exports = "function" == typeof i && /native code/.test(o(i)) | |
}, | |
"./node_modules/core-js/internals/object-assign.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/descriptors.js") | |
, o = n("./node_modules/core-js/internals/fails.js") | |
, i = n("./node_modules/core-js/internals/object-keys.js") | |
, s = n("./node_modules/core-js/internals/object-get-own-property-symbols.js") | |
, u = n("./node_modules/core-js/internals/object-property-is-enumerable.js") | |
, a = n("./node_modules/core-js/internals/to-object.js") | |
, c = n("./node_modules/core-js/internals/indexed-object.js") | |
, l = Object.assign | |
, f = Object.defineProperty; | |
e.exports = !l || o((function() { | |
if (r && 1 !== l({ | |
b: 1 | |
}, l(f({}, "a", { | |
enumerable: !0, | |
get: function() { | |
f(this, "b", { | |
value: 3, | |
enumerable: !1 | |
}) | |
} | |
}), { | |
b: 2 | |
})).b) | |
return !0; | |
var e = {} | |
, t = {} | |
, n = Symbol(); | |
return e[n] = 7, | |
"abcdefghijklmnopqrst".split("").forEach((function(e) { | |
t[e] = e | |
} | |
)), | |
7 != l({}, e)[n] || "abcdefghijklmnopqrst" != i(l({}, t)).join("") | |
} | |
)) ? function(e, t) { | |
for (var n = a(e), o = arguments.length, l = 1, f = s.f, d = u.f; o > l; ) | |
for (var h, p = c(arguments[l++]), v = f ? i(p).concat(f(p)) : i(p), _ = v.length, g = 0; _ > g; ) | |
h = v[g++], | |
r && !d.call(p, h) || (n[h] = p[h]); | |
return n | |
} | |
: l | |
}, | |
"./node_modules/core-js/internals/object-create.js": function(e, t, n) { | |
var r, o = n("./node_modules/core-js/internals/an-object.js"), i = n("./node_modules/core-js/internals/object-define-properties.js"), s = n("./node_modules/core-js/internals/enum-bug-keys.js"), u = n("./node_modules/core-js/internals/hidden-keys.js"), a = n("./node_modules/core-js/internals/html.js"), c = n("./node_modules/core-js/internals/document-create-element.js"), l = n("./node_modules/core-js/internals/shared-key.js"), f = l("IE_PROTO"), d = function() {}, h = function(e) { | |
return "<script>" + e + "<\/script>" | |
}, p = function() { | |
try { | |
r = document.domain && new ActiveXObject("htmlfile") | |
} catch (e) {} | |
var e, t; | |
p = r ? function(e) { | |
e.write(h("")), | |
e.close(); | |
var t = e.parentWindow.Object; | |
return e = null, | |
t | |
}(r) : ((t = c("iframe")).style.display = "none", | |
a.appendChild(t), | |
t.src = String("javascript:"), | |
(e = t.contentWindow.document).open(), | |
e.write(h("document.F=Object")), | |
e.close(), | |
e.F); | |
for (var n = s.length; n--; ) | |
delete p.prototype[s[n]]; | |
return p() | |
}; | |
u[f] = !0, | |
e.exports = Object.create || function(e, t) { | |
var n; | |
return null !== e ? (d.prototype = o(e), | |
n = new d, | |
d.prototype = null, | |
n[f] = e) : n = p(), | |
void 0 === t ? n : i(n, t) | |
} | |
}, | |
"./node_modules/core-js/internals/object-define-properties.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/descriptors.js") | |
, o = n("./node_modules/core-js/internals/object-define-property.js") | |
, i = n("./node_modules/core-js/internals/an-object.js") | |
, s = n("./node_modules/core-js/internals/object-keys.js"); | |
e.exports = r ? Object.defineProperties : function(e, t) { | |
i(e); | |
for (var n, r = s(t), u = r.length, a = 0; u > a; ) | |
o.f(e, n = r[a++], t[n]); | |
return e | |
} | |
}, | |
"./node_modules/core-js/internals/object-define-property.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/descriptors.js") | |
, o = n("./node_modules/core-js/internals/ie8-dom-define.js") | |
, i = n("./node_modules/core-js/internals/an-object.js") | |
, s = n("./node_modules/core-js/internals/to-primitive.js") | |
, u = Object.defineProperty; | |
t.f = r ? u : function(e, t, n) { | |
if (i(e), | |
t = s(t, !0), | |
i(n), | |
o) | |
try { | |
return u(e, t, n) | |
} catch (e) {} | |
if ("get"in n || "set"in n) | |
throw TypeError("Accessors not supported"); | |
return "value"in n && (e[t] = n.value), | |
e | |
} | |
}, | |
"./node_modules/core-js/internals/object-get-own-property-descriptor.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/descriptors.js") | |
, o = n("./node_modules/core-js/internals/object-property-is-enumerable.js") | |
, i = n("./node_modules/core-js/internals/create-property-descriptor.js") | |
, s = n("./node_modules/core-js/internals/to-indexed-object.js") | |
, u = n("./node_modules/core-js/internals/to-primitive.js") | |
, a = n("./node_modules/core-js/internals/has.js") | |
, c = n("./node_modules/core-js/internals/ie8-dom-define.js") | |
, l = Object.getOwnPropertyDescriptor; | |
t.f = r ? l : function(e, t) { | |
if (e = s(e), | |
t = u(t, !0), | |
c) | |
try { | |
return l(e, t) | |
} catch (e) {} | |
if (a(e, t)) | |
return i(!o.f.call(e, t), e[t]) | |
} | |
}, | |
"./node_modules/core-js/internals/object-get-own-property-names.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/object-keys-internal.js") | |
, o = n("./node_modules/core-js/internals/enum-bug-keys.js").concat("length", "prototype"); | |
t.f = Object.getOwnPropertyNames || function(e) { | |
return r(e, o) | |
} | |
}, | |
"./node_modules/core-js/internals/object-get-own-property-symbols.js": function(e, t) { | |
t.f = Object.getOwnPropertySymbols | |
}, | |
"./node_modules/core-js/internals/object-get-prototype-of.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/has.js") | |
, o = n("./node_modules/core-js/internals/to-object.js") | |
, i = n("./node_modules/core-js/internals/shared-key.js") | |
, s = n("./node_modules/core-js/internals/correct-prototype-getter.js") | |
, u = i("IE_PROTO") | |
, a = Object.prototype; | |
e.exports = s ? Object.getPrototypeOf : function(e) { | |
return e = o(e), | |
r(e, u) ? e[u] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? a : null | |
} | |
}, | |
"./node_modules/core-js/internals/object-keys-internal.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/has.js") | |
, o = n("./node_modules/core-js/internals/to-indexed-object.js") | |
, i = n("./node_modules/core-js/internals/array-includes.js").indexOf | |
, s = n("./node_modules/core-js/internals/hidden-keys.js"); | |
e.exports = function(e, t) { | |
var n, u = o(e), a = 0, c = []; | |
for (n in u) | |
!r(s, n) && r(u, n) && c.push(n); | |
for (; t.length > a; ) | |
r(u, n = t[a++]) && (~i(c, n) || c.push(n)); | |
return c | |
} | |
}, | |
"./node_modules/core-js/internals/object-keys.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/object-keys-internal.js") | |
, o = n("./node_modules/core-js/internals/enum-bug-keys.js"); | |
e.exports = Object.keys || function(e) { | |
return r(e, o) | |
} | |
}, | |
"./node_modules/core-js/internals/object-property-is-enumerable.js": function(e, t, n) { | |
"use strict"; | |
var r = {}.propertyIsEnumerable | |
, o = Object.getOwnPropertyDescriptor | |
, i = o && !r.call({ | |
1: 2 | |
}, 1); | |
t.f = i ? function(e) { | |
var t = o(this, e); | |
return !!t && t.enumerable | |
} | |
: r | |
}, | |
"./node_modules/core-js/internals/object-set-prototype-of.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/an-object.js") | |
, o = n("./node_modules/core-js/internals/a-possible-prototype.js"); | |
e.exports = Object.setPrototypeOf || ("__proto__"in {} ? function() { | |
var e, t = !1, n = {}; | |
try { | |
(e = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set).call(n, []), | |
t = n instanceof Array | |
} catch (e) {} | |
return function(n, i) { | |
return r(n), | |
o(i), | |
t ? e.call(n, i) : n.__proto__ = i, | |
n | |
} | |
}() : void 0) | |
}, | |
"./node_modules/core-js/internals/own-keys.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/get-built-in.js") | |
, o = n("./node_modules/core-js/internals/object-get-own-property-names.js") | |
, i = n("./node_modules/core-js/internals/object-get-own-property-symbols.js") | |
, s = n("./node_modules/core-js/internals/an-object.js"); | |
e.exports = r("Reflect", "ownKeys") || function(e) { | |
var t = o.f(s(e)) | |
, n = i.f; | |
return n ? t.concat(n(e)) : t | |
} | |
}, | |
"./node_modules/core-js/internals/path.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js"); | |
e.exports = r | |
}, | |
"./node_modules/core-js/internals/redefine-all.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/redefine.js"); | |
e.exports = function(e, t, n) { | |
for (var o in t) | |
r(e, o, t[o], n); | |
return e | |
} | |
}, | |
"./node_modules/core-js/internals/redefine.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/create-non-enumerable-property.js") | |
, i = n("./node_modules/core-js/internals/has.js") | |
, s = n("./node_modules/core-js/internals/set-global.js") | |
, u = n("./node_modules/core-js/internals/inspect-source.js") | |
, a = n("./node_modules/core-js/internals/internal-state.js") | |
, c = a.get | |
, l = a.enforce | |
, f = String(String).split("String"); | |
(e.exports = function(e, t, n, u) { | |
var a = !!u && !!u.unsafe | |
, c = !!u && !!u.enumerable | |
, d = !!u && !!u.noTargetGet; | |
"function" == typeof n && ("string" != typeof t || i(n, "name") || o(n, "name", t), | |
l(n).source = f.join("string" == typeof t ? t : "")), | |
e !== r ? (a ? !d && e[t] && (c = !0) : delete e[t], | |
c ? e[t] = n : o(e, t, n)) : c ? e[t] = n : s(t, n) | |
} | |
)(Function.prototype, "toString", (function() { | |
return "function" == typeof this && c(this).source || u(this) | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/regexp-exec-abstract.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/classof-raw.js") | |
, o = n("./node_modules/core-js/internals/regexp-exec.js"); | |
e.exports = function(e, t) { | |
var n = e.exec; | |
if ("function" == typeof n) { | |
var i = n.call(e, t); | |
if ("object" != typeof i) | |
throw TypeError("RegExp exec method returned something other than an Object or null"); | |
return i | |
} | |
if ("RegExp" !== r(e)) | |
throw TypeError("RegExp#exec called on incompatible receiver"); | |
return o.call(e, t) | |
} | |
}, | |
"./node_modules/core-js/internals/regexp-exec.js": function(e, t, n) { | |
"use strict"; | |
var r, o, i = n("./node_modules/core-js/internals/regexp-flags.js"), s = n("./node_modules/core-js/internals/regexp-sticky-helpers.js"), u = RegExp.prototype.exec, a = String.prototype.replace, c = u, l = (r = /a/, | |
o = /b*/g, | |
u.call(r, "a"), | |
u.call(o, "a"), | |
0 !== r.lastIndex || 0 !== o.lastIndex), f = s.UNSUPPORTED_Y || s.BROKEN_CARET, d = void 0 !== /()??/.exec("")[1]; | |
(l || d || f) && (c = function(e) { | |
var t, n, r, o, s = this, c = f && s.sticky, h = i.call(s), p = s.source, v = 0, _ = e; | |
return c && (-1 === (h = h.replace("y", "")).indexOf("g") && (h += "g"), | |
_ = String(e).slice(s.lastIndex), | |
s.lastIndex > 0 && (!s.multiline || s.multiline && "\n" !== e[s.lastIndex - 1]) && (p = "(?: " + p + ")", | |
_ = " " + _, | |
v++), | |
n = new RegExp("^(?:" + p + ")",h)), | |
d && (n = new RegExp("^" + p + "$(?!\\s)",h)), | |
l && (t = s.lastIndex), | |
r = u.call(c ? n : s, _), | |
c ? r ? (r.input = r.input.slice(v), | |
r[0] = r[0].slice(v), | |
r.index = s.lastIndex, | |
s.lastIndex += r[0].length) : s.lastIndex = 0 : l && r && (s.lastIndex = s.global ? r.index + r[0].length : t), | |
d && r && r.length > 1 && a.call(r[0], n, (function() { | |
for (o = 1; o < arguments.length - 2; o++) | |
void 0 === arguments[o] && (r[o] = void 0) | |
} | |
)), | |
r | |
} | |
), | |
e.exports = c | |
}, | |
"./node_modules/core-js/internals/regexp-flags.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/an-object.js"); | |
e.exports = function() { | |
var e = r(this) | |
, t = ""; | |
return e.global && (t += "g"), | |
e.ignoreCase && (t += "i"), | |
e.multiline && (t += "m"), | |
e.dotAll && (t += "s"), | |
e.unicode && (t += "u"), | |
e.sticky && (t += "y"), | |
t | |
} | |
}, | |
"./node_modules/core-js/internals/regexp-sticky-helpers.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/fails.js"); | |
function o(e, t) { | |
return RegExp(e, t) | |
} | |
t.UNSUPPORTED_Y = r((function() { | |
var e = o("a", "y"); | |
return e.lastIndex = 2, | |
null != e.exec("abcd") | |
} | |
)), | |
t.BROKEN_CARET = r((function() { | |
var e = o("^r", "gy"); | |
return e.lastIndex = 2, | |
null != e.exec("str") | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/require-object-coercible.js": function(e, t) { | |
e.exports = function(e) { | |
if (null == e) | |
throw TypeError("Can't call method on " + e); | |
return e | |
} | |
}, | |
"./node_modules/core-js/internals/set-global.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/create-non-enumerable-property.js"); | |
e.exports = function(e, t) { | |
try { | |
o(r, e, t) | |
} catch (n) { | |
r[e] = t | |
} | |
return t | |
} | |
}, | |
"./node_modules/core-js/internals/set-species.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/get-built-in.js") | |
, o = n("./node_modules/core-js/internals/object-define-property.js") | |
, i = n("./node_modules/core-js/internals/well-known-symbol.js") | |
, s = n("./node_modules/core-js/internals/descriptors.js") | |
, u = i("species"); | |
e.exports = function(e) { | |
var t = r(e) | |
, n = o.f; | |
s && t && !t[u] && n(t, u, { | |
configurable: !0, | |
get: function() { | |
return this | |
} | |
}) | |
} | |
}, | |
"./node_modules/core-js/internals/set-to-string-tag.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/object-define-property.js").f | |
, o = n("./node_modules/core-js/internals/has.js") | |
, i = n("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag"); | |
e.exports = function(e, t, n) { | |
e && !o(e = n ? e : e.prototype, i) && r(e, i, { | |
configurable: !0, | |
value: t | |
}) | |
} | |
}, | |
"./node_modules/core-js/internals/shared-key.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/shared.js") | |
, o = n("./node_modules/core-js/internals/uid.js") | |
, i = r("keys"); | |
e.exports = function(e) { | |
return i[e] || (i[e] = o(e)) | |
} | |
}, | |
"./node_modules/core-js/internals/shared-store.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/set-global.js") | |
, i = r["__core-js_shared__"] || o("__core-js_shared__", {}); | |
e.exports = i | |
}, | |
"./node_modules/core-js/internals/shared.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/is-pure.js") | |
, o = n("./node_modules/core-js/internals/shared-store.js"); | |
(e.exports = function(e, t) { | |
return o[e] || (o[e] = void 0 !== t ? t : {}) | |
} | |
)("versions", []).push({ | |
version: "3.6.5", | |
mode: r ? "pure" : "global", | |
copyright: "© 2020 Denis Pushkarev (zloirock.ru)" | |
}) | |
}, | |
"./node_modules/core-js/internals/string-multibyte.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-integer.js") | |
, o = n("./node_modules/core-js/internals/require-object-coercible.js") | |
, i = function(e) { | |
return function(t, n) { | |
var i, s, u = String(o(t)), a = r(n), c = u.length; | |
return a < 0 || a >= c ? e ? "" : void 0 : (i = u.charCodeAt(a)) < 55296 || i > 56319 || a + 1 === c || (s = u.charCodeAt(a + 1)) < 56320 || s > 57343 ? e ? u.charAt(a) : i : e ? u.slice(a, a + 2) : s - 56320 + (i - 55296 << 10) + 65536 | |
} | |
}; | |
e.exports = { | |
codeAt: i(!1), | |
charAt: i(!0) | |
} | |
}, | |
"./node_modules/core-js/internals/string-punycode-to-ascii.js": function(e, t, n) { | |
"use strict"; | |
var r = /[^\0-\u007E]/ | |
, o = /[.\u3002\uFF0E\uFF61]/g | |
, i = "Overflow: input needs wider integers to process" | |
, s = Math.floor | |
, u = String.fromCharCode | |
, a = function(e) { | |
return e + 22 + 75 * (e < 26) | |
} | |
, c = function(e, t, n) { | |
var r = 0; | |
for (e = n ? s(e / 700) : e >> 1, | |
e += s(e / t); e > 455; r += 36) | |
e = s(e / 35); | |
return s(r + 36 * e / (e + 38)) | |
} | |
, l = function(e) { | |
var t, n, r = [], o = (e = function(e) { | |
for (var t = [], n = 0, r = e.length; n < r; ) { | |
var o = e.charCodeAt(n++); | |
if (o >= 55296 && o <= 56319 && n < r) { | |
var i = e.charCodeAt(n++); | |
56320 == (64512 & i) ? t.push(((1023 & o) << 10) + (1023 & i) + 65536) : (t.push(o), | |
n--) | |
} else | |
t.push(o) | |
} | |
return t | |
}(e)).length, l = 128, f = 0, d = 72; | |
for (t = 0; t < e.length; t++) | |
(n = e[t]) < 128 && r.push(u(n)); | |
var h = r.length | |
, p = h; | |
for (h && r.push("-"); p < o; ) { | |
var v = 2147483647; | |
for (t = 0; t < e.length; t++) | |
(n = e[t]) >= l && n < v && (v = n); | |
var _ = p + 1; | |
if (v - l > s((2147483647 - f) / _)) | |
throw RangeError(i); | |
for (f += (v - l) * _, | |
l = v, | |
t = 0; t < e.length; t++) { | |
if ((n = e[t]) < l && ++f > 2147483647) | |
throw RangeError(i); | |
if (n == l) { | |
for (var g = f, j = 36; ; j += 36) { | |
var m = j <= d ? 1 : j >= d + 26 ? 26 : j - d; | |
if (g < m) | |
break; | |
var y = g - m | |
, b = 36 - m; | |
r.push(u(a(m + y % b))), | |
g = s(y / b) | |
} | |
r.push(u(a(g))), | |
d = c(f, _, p == h), | |
f = 0, | |
++p | |
} | |
} | |
++f, | |
++l | |
} | |
return r.join("") | |
}; | |
e.exports = function(e) { | |
var t, n, i = [], s = e.toLowerCase().replace(o, ".").split("."); | |
for (t = 0; t < s.length; t++) | |
n = s[t], | |
i.push(r.test(n) ? "xn--" + l(n) : n); | |
return i.join(".") | |
} | |
}, | |
"./node_modules/core-js/internals/to-absolute-index.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-integer.js") | |
, o = Math.max | |
, i = Math.min; | |
e.exports = function(e, t) { | |
var n = r(e); | |
return n < 0 ? o(n + t, 0) : i(n, t) | |
} | |
}, | |
"./node_modules/core-js/internals/to-index.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-integer.js") | |
, o = n("./node_modules/core-js/internals/to-length.js"); | |
e.exports = function(e) { | |
if (void 0 === e) | |
return 0; | |
var t = r(e) | |
, n = o(t); | |
if (t !== n) | |
throw RangeError("Wrong length or index"); | |
return n | |
} | |
}, | |
"./node_modules/core-js/internals/to-indexed-object.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/indexed-object.js") | |
, o = n("./node_modules/core-js/internals/require-object-coercible.js"); | |
e.exports = function(e) { | |
return r(o(e)) | |
} | |
}, | |
"./node_modules/core-js/internals/to-integer.js": function(e, t) { | |
var n = Math.ceil | |
, r = Math.floor; | |
e.exports = function(e) { | |
return isNaN(e = +e) ? 0 : (e > 0 ? r : n)(e) | |
} | |
}, | |
"./node_modules/core-js/internals/to-length.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-integer.js") | |
, o = Math.min; | |
e.exports = function(e) { | |
return e > 0 ? o(r(e), 9007199254740991) : 0 | |
} | |
}, | |
"./node_modules/core-js/internals/to-object.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/require-object-coercible.js"); | |
e.exports = function(e) { | |
return Object(r(e)) | |
} | |
}, | |
"./node_modules/core-js/internals/to-offset.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-positive-integer.js"); | |
e.exports = function(e, t) { | |
var n = r(e); | |
if (n % t) | |
throw RangeError("Wrong offset"); | |
return n | |
} | |
}, | |
"./node_modules/core-js/internals/to-positive-integer.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-integer.js"); | |
e.exports = function(e) { | |
var t = r(e); | |
if (t < 0) | |
throw RangeError("The argument can't be less than 0"); | |
return t | |
} | |
}, | |
"./node_modules/core-js/internals/to-primitive.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/is-object.js"); | |
e.exports = function(e, t) { | |
if (!r(e)) | |
return e; | |
var n, o; | |
if (t && "function" == typeof (n = e.toString) && !r(o = n.call(e))) | |
return o; | |
if ("function" == typeof (n = e.valueOf) && !r(o = n.call(e))) | |
return o; | |
if (!t && "function" == typeof (n = e.toString) && !r(o = n.call(e))) | |
return o; | |
throw TypeError("Can't convert object to primitive value") | |
} | |
}, | |
"./node_modules/core-js/internals/to-string-tag-support.js": function(e, t, n) { | |
var r = {}; | |
r[n("./node_modules/core-js/internals/well-known-symbol.js")("toStringTag")] = "z", | |
e.exports = "[object z]" === String(r) | |
}, | |
"./node_modules/core-js/internals/typed-array-constructor.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/export.js") | |
, o = n("./node_modules/core-js/internals/global.js") | |
, i = n("./node_modules/core-js/internals/descriptors.js") | |
, s = n("./node_modules/core-js/internals/typed-array-constructors-require-wrappers.js") | |
, u = n("./node_modules/core-js/internals/array-buffer-view-core.js") | |
, a = n("./node_modules/core-js/internals/array-buffer.js") | |
, c = n("./node_modules/core-js/internals/an-instance.js") | |
, l = n("./node_modules/core-js/internals/create-property-descriptor.js") | |
, f = n("./node_modules/core-js/internals/create-non-enumerable-property.js") | |
, d = n("./node_modules/core-js/internals/to-length.js") | |
, h = n("./node_modules/core-js/internals/to-index.js") | |
, p = n("./node_modules/core-js/internals/to-offset.js") | |
, v = n("./node_modules/core-js/internals/to-primitive.js") | |
, _ = n("./node_modules/core-js/internals/has.js") | |
, g = n("./node_modules/core-js/internals/classof.js") | |
, j = n("./node_modules/core-js/internals/is-object.js") | |
, m = n("./node_modules/core-js/internals/object-create.js") | |
, y = n("./node_modules/core-js/internals/object-set-prototype-of.js") | |
, b = n("./node_modules/core-js/internals/object-get-own-property-names.js").f | |
, E = n("./node_modules/core-js/internals/typed-array-from.js") | |
, w = n("./node_modules/core-js/internals/array-iteration.js").forEach | |
, A = n("./node_modules/core-js/internals/set-species.js") | |
, C = n("./node_modules/core-js/internals/object-define-property.js") | |
, L = n("./node_modules/core-js/internals/object-get-own-property-descriptor.js") | |
, R = n("./node_modules/core-js/internals/internal-state.js") | |
, S = n("./node_modules/core-js/internals/inherit-if-required.js") | |
, T = R.get | |
, x = R.set | |
, I = C.f | |
, O = L.f | |
, U = Math.round | |
, M = o.RangeError | |
, Q = a.ArrayBuffer | |
, k = a.DataView | |
, P = u.NATIVE_ARRAY_BUFFER_VIEWS | |
, N = u.TYPED_ARRAY_TAG | |
, D = u.TypedArray | |
, B = u.TypedArrayPrototype | |
, F = u.aTypedArrayConstructor | |
, Z = u.isTypedArray | |
, Y = function(e, t) { | |
for (var n = 0, r = t.length, o = new (F(e))(r); r > n; ) | |
o[n] = t[n++]; | |
return o | |
} | |
, K = function(e, t) { | |
I(e, t, { | |
get: function() { | |
return T(this)[t] | |
} | |
}) | |
} | |
, W = function(e) { | |
var t; | |
return e instanceof Q || "ArrayBuffer" == (t = g(e)) || "SharedArrayBuffer" == t | |
} | |
, z = function(e, t) { | |
return Z(e) && "symbol" != typeof t && t in e && String(+t) == String(t) | |
} | |
, q = function(e, t) { | |
return z(e, t = v(t, !0)) ? l(2, e[t]) : O(e, t) | |
} | |
, G = function(e, t, n) { | |
return !(z(e, t = v(t, !0)) && j(n) && _(n, "value")) || _(n, "get") || _(n, "set") || n.configurable || _(n, "writable") && !n.writable || _(n, "enumerable") && !n.enumerable ? I(e, t, n) : (e[t] = n.value, | |
e) | |
}; | |
i ? (P || (L.f = q, | |
C.f = G, | |
K(B, "buffer"), | |
K(B, "byteOffset"), | |
K(B, "byteLength"), | |
K(B, "length")), | |
r({ | |
target: "Object", | |
stat: !0, | |
forced: !P | |
}, { | |
getOwnPropertyDescriptor: q, | |
defineProperty: G | |
}), | |
e.exports = function(e, t, n) { | |
var i = e.match(/\d+$/)[0] / 8 | |
, u = e + (n ? "Clamped" : "") + "Array" | |
, a = "get" + e | |
, l = "set" + e | |
, v = o[u] | |
, _ = v | |
, g = _ && _.prototype | |
, C = {} | |
, L = function(e, t) { | |
I(e, t, { | |
get: function() { | |
return function(e, t) { | |
var n = T(e); | |
return n.view[a](t * i + n.byteOffset, !0) | |
}(this, t) | |
}, | |
set: function(e) { | |
return function(e, t, r) { | |
var o = T(e); | |
n && (r = (r = U(r)) < 0 ? 0 : r > 255 ? 255 : 255 & r), | |
o.view[l](t * i + o.byteOffset, r, !0) | |
}(this, t, e) | |
}, | |
enumerable: !0 | |
}) | |
}; | |
P ? s && (_ = t((function(e, t, n, r) { | |
return c(e, _, u), | |
S(j(t) ? W(t) ? void 0 !== r ? new v(t,p(n, i),r) : void 0 !== n ? new v(t,p(n, i)) : new v(t) : Z(t) ? Y(_, t) : E.call(_, t) : new v(h(t)), e, _) | |
} | |
)), | |
y && y(_, D), | |
w(b(v), (function(e) { | |
e in _ || f(_, e, v[e]) | |
} | |
)), | |
_.prototype = g) : (_ = t((function(e, t, n, r) { | |
c(e, _, u); | |
var o, s, a, l = 0, f = 0; | |
if (j(t)) { | |
if (!W(t)) | |
return Z(t) ? Y(_, t) : E.call(_, t); | |
o = t, | |
f = p(n, i); | |
var v = t.byteLength; | |
if (void 0 === r) { | |
if (v % i) | |
throw M("Wrong length"); | |
if ((s = v - f) < 0) | |
throw M("Wrong length") | |
} else if ((s = d(r) * i) + f > v) | |
throw M("Wrong length"); | |
a = s / i | |
} else | |
a = h(t), | |
o = new Q(s = a * i); | |
for (x(e, { | |
buffer: o, | |
byteOffset: f, | |
byteLength: s, | |
length: a, | |
view: new k(o) | |
}); l < a; ) | |
L(e, l++) | |
} | |
)), | |
y && y(_, D), | |
g = _.prototype = m(B)), | |
g.constructor !== _ && f(g, "constructor", _), | |
N && f(g, N, u), | |
C[u] = _, | |
r({ | |
global: !0, | |
forced: _ != v, | |
sham: !P | |
}, C), | |
"BYTES_PER_ELEMENT"in _ || f(_, "BYTES_PER_ELEMENT", i), | |
"BYTES_PER_ELEMENT"in g || f(g, "BYTES_PER_ELEMENT", i), | |
A(u) | |
} | |
) : e.exports = function() {} | |
}, | |
"./node_modules/core-js/internals/typed-array-constructors-require-wrappers.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/fails.js") | |
, i = n("./node_modules/core-js/internals/check-correctness-of-iteration.js") | |
, s = n("./node_modules/core-js/internals/array-buffer-view-core.js").NATIVE_ARRAY_BUFFER_VIEWS | |
, u = r.ArrayBuffer | |
, a = r.Int8Array; | |
e.exports = !s || !o((function() { | |
a(1) | |
} | |
)) || !o((function() { | |
new a(-1) | |
} | |
)) || !i((function(e) { | |
new a, | |
new a(null), | |
new a(1.5), | |
new a(e) | |
} | |
), !0) || o((function() { | |
return 1 !== new a(new u(2),1,void 0).length | |
} | |
)) | |
}, | |
"./node_modules/core-js/internals/typed-array-from.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/to-object.js") | |
, o = n("./node_modules/core-js/internals/to-length.js") | |
, i = n("./node_modules/core-js/internals/get-iterator-method.js") | |
, s = n("./node_modules/core-js/internals/is-array-iterator-method.js") | |
, u = n("./node_modules/core-js/internals/function-bind-context.js") | |
, a = n("./node_modules/core-js/internals/array-buffer-view-core.js").aTypedArrayConstructor; | |
e.exports = function(e) { | |
var t, n, c, l, f, d, h = r(e), p = arguments.length, v = p > 1 ? arguments[1] : void 0, _ = void 0 !== v, g = i(h); | |
if (null != g && !s(g)) | |
for (d = (f = g.call(h)).next, | |
h = []; !(l = d.call(f)).done; ) | |
h.push(l.value); | |
for (_ && p > 2 && (v = u(v, arguments[2], 2)), | |
n = o(h.length), | |
c = new (a(this))(n), | |
t = 0; n > t; t++) | |
c[t] = _ ? v(h[t], t) : h[t]; | |
return c | |
} | |
}, | |
"./node_modules/core-js/internals/uid.js": function(e, t) { | |
var n = 0 | |
, r = Math.random(); | |
e.exports = function(e) { | |
return "Symbol(" + String(void 0 === e ? "" : e) + ")_" + (++n + r).toString(36) | |
} | |
}, | |
"./node_modules/core-js/internals/use-symbol-as-uid.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/native-symbol.js"); | |
e.exports = r && !Symbol.sham && "symbol" == typeof Symbol.iterator | |
}, | |
"./node_modules/core-js/internals/well-known-symbol.js": function(e, t, n) { | |
var r = n("./node_modules/core-js/internals/global.js") | |
, o = n("./node_modules/core-js/internals/shared.js") | |
, i = n("./node_modules/core-js/internals/has.js") | |
, s = n("./node_modules/core-js/internals/uid.js") | |
, u = n("./node_modules/core-js/internals/native-symbol.js") | |
, a = n("./node_modules/core-js/internals/use-symbol-as-uid.js") | |
, c = o("wks") | |
, l = r.Symbol | |
, f = a ? l : l && l.withoutSetter || s; | |
e.exports = function(e) { | |
return i(c, e) || (u && i(l, e) ? c[e] = l[e] : c[e] = f("Symbol." + e)), | |
c[e] | |
} | |
}, | |
"./node_modules/core-js/modules/es.array.iterator.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/to-indexed-object.js") | |
, o = n("./node_modules/core-js/internals/add-to-unscopables.js") | |
, i = n("./node_modules/core-js/internals/iterators.js") | |
, s = n("./node_modules/core-js/internals/internal-state.js") | |
, u = n("./node_modules/core-js/internals/define-iterator.js") | |
, a = s.set | |
, c = s.getterFor("Array Iterator"); | |
e.exports = u(Array, "Array", (function(e, t) { | |
a(this, { | |
type: "Array Iterator", | |
target: r(e), | |
index: 0, | |
kind: t | |
}) | |
} | |
), (function() { | |
var e = c(this) | |
, t = e.target | |
, n = e.kind | |
, r = e.index++; | |
return !t || r >= t.length ? (e.target = void 0, | |
{ | |
value: void 0, | |
done: !0 | |
}) : "keys" == n ? { | |
value: r, | |
done: !1 | |
} : "values" == n ? { | |
value: t[r], | |
done: !1 | |
} : { | |
value: [r, t[r]], | |
done: !1 | |
} | |
} | |
), "values"), | |
i.Arguments = i.Array, | |
o("keys"), | |
o("values"), | |
o("entries") | |
}, | |
"./node_modules/core-js/modules/es.array.reduce.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/export.js") | |
, o = n("./node_modules/core-js/internals/array-reduce.js").left | |
, i = n("./node_modules/core-js/internals/array-method-is-strict.js") | |
, s = n("./node_modules/core-js/internals/array-method-uses-to-length.js") | |
, u = i("reduce") | |
, a = s("reduce", { | |
1: 0 | |
}); | |
r({ | |
target: "Array", | |
proto: !0, | |
forced: !u || !a | |
}, { | |
reduce: function(e) { | |
return o(this, e, arguments.length, arguments.length > 1 ? arguments[1] : void 0) | |
} | |
}) | |
}, | |
"./node_modules/core-js/modules/es.regexp.exec.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/export.js") | |
, o = n("./node_modules/core-js/internals/regexp-exec.js"); | |
r({ | |
target: "RegExp", | |
proto: !0, | |
forced: /./.exec !== o | |
}, { | |
exec: o | |
}) | |
}, | |
"./node_modules/core-js/modules/es.string.iterator.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/string-multibyte.js").charAt | |
, o = n("./node_modules/core-js/internals/internal-state.js") | |
, i = n("./node_modules/core-js/internals/define-iterator.js") | |
, s = o.set | |
, u = o.getterFor("String Iterator"); | |
i(String, "String", (function(e) { | |
s(this, { | |
type: "String Iterator", | |
string: String(e), | |
index: 0 | |
}) | |
} | |
), (function() { | |
var e, t = u(this), n = t.string, o = t.index; | |
return o >= n.length ? { | |
value: void 0, | |
done: !0 | |
} : (e = r(n, o), | |
t.index += e.length, | |
{ | |
value: e, | |
done: !1 | |
}) | |
} | |
)) | |
}, | |
"./node_modules/core-js/modules/es.string.replace.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js") | |
, o = n("./node_modules/core-js/internals/an-object.js") | |
, i = n("./node_modules/core-js/internals/to-object.js") | |
, s = n("./node_modules/core-js/internals/to-length.js") | |
, u = n("./node_modules/core-js/internals/to-integer.js") | |
, a = n("./node_modules/core-js/internals/require-object-coercible.js") | |
, c = n("./node_modules/core-js/internals/advance-string-index.js") | |
, l = n("./node_modules/core-js/internals/regexp-exec-abstract.js") | |
, f = Math.max | |
, d = Math.min | |
, h = Math.floor | |
, p = /\$([$&'`]|\d\d?|<[^>]*>)/g | |
, v = /\$([$&'`]|\d\d?)/g; | |
r("replace", 2, (function(e, t, n, r) { | |
var _ = r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE | |
, g = r.REPLACE_KEEPS_$0 | |
, j = _ ? "$" : "$0"; | |
return [function(n, r) { | |
var o = a(this) | |
, i = null == n ? void 0 : n[e]; | |
return void 0 !== i ? i.call(n, o, r) : t.call(String(o), n, r) | |
} | |
, function(e, r) { | |
if (!_ && g || "string" == typeof r && -1 === r.indexOf(j)) { | |
var i = n(t, e, this, r); | |
if (i.done) | |
return i.value | |
} | |
var a = o(e) | |
, h = String(this) | |
, p = "function" == typeof r; | |
p || (r = String(r)); | |
var v = a.global; | |
if (v) { | |
var y = a.unicode; | |
a.lastIndex = 0 | |
} | |
for (var b = []; ; ) { | |
var E = l(a, h); | |
if (null === E) | |
break; | |
if (b.push(E), | |
!v) | |
break; | |
"" === String(E[0]) && (a.lastIndex = c(h, s(a.lastIndex), y)) | |
} | |
for (var w, A = "", C = 0, L = 0; L < b.length; L++) { | |
E = b[L]; | |
for (var R = String(E[0]), S = f(d(u(E.index), h.length), 0), T = [], x = 1; x < E.length; x++) | |
T.push(void 0 === (w = E[x]) ? w : String(w)); | |
var I = E.groups; | |
if (p) { | |
var O = [R].concat(T, S, h); | |
void 0 !== I && O.push(I); | |
var U = String(r.apply(void 0, O)) | |
} else | |
U = m(R, h, S, T, I, r); | |
S >= C && (A += h.slice(C, S) + U, | |
C = S + R.length) | |
} | |
return A + h.slice(C) | |
} | |
]; | |
function m(e, n, r, o, s, u) { | |
var a = r + e.length | |
, c = o.length | |
, l = v; | |
return void 0 !== s && (s = i(s), | |
l = p), | |
t.call(u, l, (function(t, i) { | |
var u; | |
switch (i.charAt(0)) { | |
case "$": | |
return "$"; | |
case "&": | |
return e; | |
case "`": | |
return n.slice(0, r); | |
case "'": | |
return n.slice(a); | |
case "<": | |
u = s[i.slice(1, -1)]; | |
break; | |
default: | |
var l = +i; | |
if (0 === l) | |
return t; | |
if (l > c) { | |
var f = h(l / 10); | |
return 0 === f ? t : f <= c ? void 0 === o[f - 1] ? i.charAt(1) : o[f - 1] + i.charAt(1) : t | |
} | |
u = o[l - 1] | |
} | |
return void 0 === u ? "" : u | |
} | |
)) | |
} | |
} | |
)) | |
}, | |
"./node_modules/core-js/modules/es.typed-array.int32-array.js": function(e, t, n) { | |
n("./node_modules/core-js/internals/typed-array-constructor.js")("Int32", (function(e) { | |
return function(t, n, r) { | |
return e(this, t, n, r) | |
} | |
} | |
)) | |
}, | |
"./node_modules/core-js/modules/es.typed-array.uint16-array.js": function(e, t, n) { | |
n("./node_modules/core-js/internals/typed-array-constructor.js")("Uint16", (function(e) { | |
return function(t, n, r) { | |
return e(this, t, n, r) | |
} | |
} | |
)) | |
}, | |
"./node_modules/core-js/modules/es.typed-array.uint8-array.js": function(e, t, n) { | |
n("./node_modules/core-js/internals/typed-array-constructor.js")("Uint8", (function(e) { | |
return function(t, n, r) { | |
return e(this, t, n, r) | |
} | |
} | |
)) | |
}, | |
"./node_modules/core-js/modules/web.url-search-params.js": function(e, t, n) { | |
"use strict"; | |
n("./node_modules/core-js/modules/es.array.iterator.js"); | |
var r = n("./node_modules/core-js/internals/export.js") | |
, o = n("./node_modules/core-js/internals/get-built-in.js") | |
, i = n("./node_modules/core-js/internals/native-url.js") | |
, s = n("./node_modules/core-js/internals/redefine.js") | |
, u = n("./node_modules/core-js/internals/redefine-all.js") | |
, a = n("./node_modules/core-js/internals/set-to-string-tag.js") | |
, c = n("./node_modules/core-js/internals/create-iterator-constructor.js") | |
, l = n("./node_modules/core-js/internals/internal-state.js") | |
, f = n("./node_modules/core-js/internals/an-instance.js") | |
, d = n("./node_modules/core-js/internals/has.js") | |
, h = n("./node_modules/core-js/internals/function-bind-context.js") | |
, p = n("./node_modules/core-js/internals/classof.js") | |
, v = n("./node_modules/core-js/internals/an-object.js") | |
, _ = n("./node_modules/core-js/internals/is-object.js") | |
, g = n("./node_modules/core-js/internals/object-create.js") | |
, j = n("./node_modules/core-js/internals/create-property-descriptor.js") | |
, m = n("./node_modules/core-js/internals/get-iterator.js") | |
, y = n("./node_modules/core-js/internals/get-iterator-method.js") | |
, b = n("./node_modules/core-js/internals/well-known-symbol.js") | |
, E = o("fetch") | |
, w = o("Headers") | |
, A = b("iterator") | |
, C = l.set | |
, L = l.getterFor("URLSearchParams") | |
, R = l.getterFor("URLSearchParamsIterator") | |
, S = /\+/g | |
, T = Array(4) | |
, x = function(e) { | |
return T[e - 1] || (T[e - 1] = RegExp("((?:%[\\da-f]{2}){" + e + "})", "gi")) | |
} | |
, I = function(e) { | |
try { | |
return decodeURIComponent(e) | |
} catch (t) { | |
return e | |
} | |
} | |
, O = function(e) { | |
var t = e.replace(S, " ") | |
, n = 4; | |
try { | |
return decodeURIComponent(t) | |
} catch (e) { | |
for (; n; ) | |
t = t.replace(x(n--), I); | |
return t | |
} | |
} | |
, U = /[!'()~]|%20/g | |
, M = { | |
"!": "%21", | |
"'": "%27", | |
"(": "%28", | |
")": "%29", | |
"~": "%7E", | |
"%20": "+" | |
} | |
, Q = function(e) { | |
return M[e] | |
} | |
, k = function(e) { | |
return encodeURIComponent(e).replace(U, Q) | |
} | |
, P = function(e, t) { | |
if (t) | |
for (var n, r, o = t.split("&"), i = 0; i < o.length; ) | |
(n = o[i++]).length && (r = n.split("="), | |
e.push({ | |
key: O(r.shift()), | |
value: O(r.join("=")) | |
})) | |
} | |
, N = function(e) { | |
this.entries.length = 0, | |
P(this.entries, e) | |
} | |
, D = function(e, t) { | |
if (e < t) | |
throw TypeError("Not enough arguments") | |
} | |
, B = c((function(e, t) { | |
C(this, { | |
type: "URLSearchParamsIterator", | |
iterator: m(L(e).entries), | |
kind: t | |
}) | |
} | |
), "Iterator", (function() { | |
var e = R(this) | |
, t = e.kind | |
, n = e.iterator.next() | |
, r = n.value; | |
return n.done || (n.value = "keys" === t ? r.key : "values" === t ? r.value : [r.key, r.value]), | |
n | |
} | |
)) | |
, F = function() { | |
f(this, F, "URLSearchParams"); | |
var e, t, n, r, o, i, s, u, a, c = arguments.length > 0 ? arguments[0] : void 0, l = this, h = []; | |
if (C(l, { | |
type: "URLSearchParams", | |
entries: h, | |
updateURL: function() {}, | |
updateSearchParams: N | |
}), | |
void 0 !== c) | |
if (_(c)) | |
if ("function" == typeof (e = y(c))) | |
for (n = (t = e.call(c)).next; !(r = n.call(t)).done; ) { | |
if ((s = (i = (o = m(v(r.value))).next).call(o)).done || (u = i.call(o)).done || !i.call(o).done) | |
throw TypeError("Expected sequence with length 2"); | |
h.push({ | |
key: s.value + "", | |
value: u.value + "" | |
}) | |
} | |
else | |
for (a in c) | |
d(c, a) && h.push({ | |
key: a, | |
value: c[a] + "" | |
}); | |
else | |
P(h, "string" == typeof c ? "?" === c.charAt(0) ? c.slice(1) : c : c + "") | |
} | |
, Z = F.prototype; | |
u(Z, { | |
append: function(e, t) { | |
D(arguments.length, 2); | |
var n = L(this); | |
n.entries.push({ | |
key: e + "", | |
value: t + "" | |
}), | |
n.updateURL() | |
}, | |
delete: function(e) { | |
D(arguments.length, 1); | |
for (var t = L(this), n = t.entries, r = e + "", o = 0; o < n.length; ) | |
n[o].key === r ? n.splice(o, 1) : o++; | |
t.updateURL() | |
}, | |
get: function(e) { | |
D(arguments.length, 1); | |
for (var t = L(this).entries, n = e + "", r = 0; r < t.length; r++) | |
if (t[r].key === n) | |
return t[r].value; | |
return null | |
}, | |
getAll: function(e) { | |
D(arguments.length, 1); | |
for (var t = L(this).entries, n = e + "", r = [], o = 0; o < t.length; o++) | |
t[o].key === n && r.push(t[o].value); | |
return r | |
}, | |
has: function(e) { | |
D(arguments.length, 1); | |
for (var t = L(this).entries, n = e + "", r = 0; r < t.length; ) | |
if (t[r++].key === n) | |
return !0; | |
return !1 | |
}, | |
set: function(e, t) { | |
D(arguments.length, 1); | |
for (var n, r = L(this), o = r.entries, i = !1, s = e + "", u = t + "", a = 0; a < o.length; a++) | |
(n = o[a]).key === s && (i ? o.splice(a--, 1) : (i = !0, | |
n.value = u)); | |
i || o.push({ | |
key: s, | |
value: u | |
}), | |
r.updateURL() | |
}, | |
sort: function() { | |
var e, t, n, r = L(this), o = r.entries, i = o.slice(); | |
for (o.length = 0, | |
n = 0; n < i.length; n++) { | |
for (e = i[n], | |
t = 0; t < n; t++) | |
if (o[t].key > e.key) { | |
o.splice(t, 0, e); | |
break | |
} | |
t === n && o.push(e) | |
} | |
r.updateURL() | |
}, | |
forEach: function(e) { | |
for (var t, n = L(this).entries, r = h(e, arguments.length > 1 ? arguments[1] : void 0, 3), o = 0; o < n.length; ) | |
r((t = n[o++]).value, t.key, this) | |
}, | |
keys: function() { | |
return new B(this,"keys") | |
}, | |
values: function() { | |
return new B(this,"values") | |
}, | |
entries: function() { | |
return new B(this,"entries") | |
} | |
}, { | |
enumerable: !0 | |
}), | |
s(Z, A, Z.entries), | |
s(Z, "toString", (function() { | |
for (var e, t = L(this).entries, n = [], r = 0; r < t.length; ) | |
e = t[r++], | |
n.push(k(e.key) + "=" + k(e.value)); | |
return n.join("&") | |
} | |
), { | |
enumerable: !0 | |
}), | |
a(F, "URLSearchParams"), | |
r({ | |
global: !0, | |
forced: !i | |
}, { | |
URLSearchParams: F | |
}), | |
i || "function" != typeof E || "function" != typeof w || r({ | |
global: !0, | |
enumerable: !0, | |
forced: !0 | |
}, { | |
fetch: function(e) { | |
var t, n, r, o = [e]; | |
return arguments.length > 1 && (_(t = arguments[1]) && (n = t.body, | |
"URLSearchParams" === p(n) && ((r = t.headers ? new w(t.headers) : new w).has("content-type") || r.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"), | |
t = g(t, { | |
body: j(0, String(n)), | |
headers: j(0, r) | |
}))), | |
o.push(t)), | |
E.apply(this, o) | |
} | |
}), | |
e.exports = { | |
URLSearchParams: F, | |
getState: L | |
} | |
}, | |
"./node_modules/core-js/modules/web.url.js": function(e, t, n) { | |
"use strict"; | |
n("./node_modules/core-js/modules/es.string.iterator.js"); | |
var r, o = n("./node_modules/core-js/internals/export.js"), i = n("./node_modules/core-js/internals/descriptors.js"), s = n("./node_modules/core-js/internals/native-url.js"), u = n("./node_modules/core-js/internals/global.js"), a = n("./node_modules/core-js/internals/object-define-properties.js"), c = n("./node_modules/core-js/internals/redefine.js"), l = n("./node_modules/core-js/internals/an-instance.js"), f = n("./node_modules/core-js/internals/has.js"), d = n("./node_modules/core-js/internals/object-assign.js"), h = n("./node_modules/core-js/internals/array-from.js"), p = n("./node_modules/core-js/internals/string-multibyte.js").codeAt, v = n("./node_modules/core-js/internals/string-punycode-to-ascii.js"), _ = n("./node_modules/core-js/internals/set-to-string-tag.js"), g = n("./node_modules/core-js/modules/web.url-search-params.js"), j = n("./node_modules/core-js/internals/internal-state.js"), m = u.URL, y = g.URLSearchParams, b = g.getState, E = j.set, w = j.getterFor("URL"), A = Math.floor, C = Math.pow, L = /[A-Za-z]/, R = /[\d+-.A-Za-z]/, S = /\d/, T = /^(0x|0X)/, x = /^[0-7]+$/, I = /^\d+$/, O = /^[\dA-Fa-f]+$/, U = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/, M = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/, Q = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g, k = /[\u0009\u000A\u000D]/g, P = function(e, t) { | |
var n, r, o; | |
if ("[" == t.charAt(0)) { | |
if ("]" != t.charAt(t.length - 1)) | |
return "Invalid host"; | |
if (!(n = D(t.slice(1, -1)))) | |
return "Invalid host"; | |
e.host = n | |
} else if (q(e)) { | |
if (t = v(t), | |
U.test(t)) | |
return "Invalid host"; | |
if (null === (n = N(t))) | |
return "Invalid host"; | |
e.host = n | |
} else { | |
if (M.test(t)) | |
return "Invalid host"; | |
for (n = "", | |
r = h(t), | |
o = 0; o < r.length; o++) | |
n += W(r[o], F); | |
e.host = n | |
} | |
}, N = function(e) { | |
var t, n, r, o, i, s, u, a = e.split("."); | |
if (a.length && "" == a[a.length - 1] && a.pop(), | |
(t = a.length) > 4) | |
return e; | |
for (n = [], | |
r = 0; r < t; r++) { | |
if ("" == (o = a[r])) | |
return e; | |
if (i = 10, | |
o.length > 1 && "0" == o.charAt(0) && (i = T.test(o) ? 16 : 8, | |
o = o.slice(8 == i ? 1 : 2)), | |
"" === o) | |
s = 0; | |
else { | |
if (!(10 == i ? I : 8 == i ? x : O).test(o)) | |
return e; | |
s = parseInt(o, i) | |
} | |
n.push(s) | |
} | |
for (r = 0; r < t; r++) | |
if (s = n[r], | |
r == t - 1) { | |
if (s >= C(256, 5 - t)) | |
return null | |
} else if (s > 255) | |
return null; | |
for (u = n.pop(), | |
r = 0; r < n.length; r++) | |
u += n[r] * C(256, 3 - r); | |
return u | |
}, D = function(e) { | |
var t, n, r, o, i, s, u, a = [0, 0, 0, 0, 0, 0, 0, 0], c = 0, l = null, f = 0, d = function() { | |
return e.charAt(f) | |
}; | |
if (":" == d()) { | |
if (":" != e.charAt(1)) | |
return; | |
f += 2, | |
l = ++c | |
} | |
for (; d(); ) { | |
if (8 == c) | |
return; | |
if (":" != d()) { | |
for (t = n = 0; n < 4 && O.test(d()); ) | |
t = 16 * t + parseInt(d(), 16), | |
f++, | |
n++; | |
if ("." == d()) { | |
if (0 == n) | |
return; | |
if (f -= n, | |
c > 6) | |
return; | |
for (r = 0; d(); ) { | |
if (o = null, | |
r > 0) { | |
if (!("." == d() && r < 4)) | |
return; | |
f++ | |
} | |
if (!S.test(d())) | |
return; | |
for (; S.test(d()); ) { | |
if (i = parseInt(d(), 10), | |
null === o) | |
o = i; | |
else { | |
if (0 == o) | |
return; | |
o = 10 * o + i | |
} | |
if (o > 255) | |
return; | |
f++ | |
} | |
a[c] = 256 * a[c] + o, | |
2 != ++r && 4 != r || c++ | |
} | |
if (4 != r) | |
return; | |
break | |
} | |
if (":" == d()) { | |
if (f++, | |
!d()) | |
return | |
} else if (d()) | |
return; | |
a[c++] = t | |
} else { | |
if (null !== l) | |
return; | |
f++, | |
l = ++c | |
} | |
} | |
if (null !== l) | |
for (s = c - l, | |
c = 7; 0 != c && s > 0; ) | |
u = a[c], | |
a[c--] = a[l + s - 1], | |
a[l + --s] = u; | |
else if (8 != c) | |
return; | |
return a | |
}, B = function(e) { | |
var t, n, r, o; | |
if ("number" == typeof e) { | |
for (t = [], | |
n = 0; n < 4; n++) | |
t.unshift(e % 256), | |
e = A(e / 256); | |
return t.join(".") | |
} | |
if ("object" == typeof e) { | |
for (t = "", | |
r = function(e) { | |
for (var t = null, n = 1, r = null, o = 0, i = 0; i < 8; i++) | |
0 !== e[i] ? (o > n && (t = r, | |
n = o), | |
r = null, | |
o = 0) : (null === r && (r = i), | |
++o); | |
return o > n && (t = r, | |
n = o), | |
t | |
}(e), | |
n = 0; n < 8; n++) | |
o && 0 === e[n] || (o && (o = !1), | |
r === n ? (t += n ? ":" : "::", | |
o = !0) : (t += e[n].toString(16), | |
n < 7 && (t += ":"))); | |
return "[" + t + "]" | |
} | |
return e | |
}, F = {}, Z = d({}, F, { | |
" ": 1, | |
'"': 1, | |
"<": 1, | |
">": 1, | |
"`": 1 | |
}), Y = d({}, Z, { | |
"#": 1, | |
"?": 1, | |
"{": 1, | |
"}": 1 | |
}), K = d({}, Y, { | |
"/": 1, | |
":": 1, | |
";": 1, | |
"=": 1, | |
"@": 1, | |
"[": 1, | |
"\\": 1, | |
"]": 1, | |
"^": 1, | |
"|": 1 | |
}), W = function(e, t) { | |
var n = p(e, 0); | |
return n > 32 && n < 127 && !f(t, e) ? e : encodeURIComponent(e) | |
}, z = { | |
ftp: 21, | |
file: null, | |
http: 80, | |
https: 443, | |
ws: 80, | |
wss: 443 | |
}, q = function(e) { | |
return f(z, e.scheme) | |
}, G = function(e) { | |
return "" != e.username || "" != e.password | |
}, H = function(e) { | |
return !e.host || e.cannotBeABaseURL || "file" == e.scheme | |
}, V = function(e, t) { | |
var n; | |
return 2 == e.length && L.test(e.charAt(0)) && (":" == (n = e.charAt(1)) || !t && "|" == n) | |
}, X = function(e) { | |
var t; | |
return e.length > 1 && V(e.slice(0, 2)) && (2 == e.length || "/" === (t = e.charAt(2)) || "\\" === t || "?" === t || "#" === t) | |
}, J = function(e) { | |
var t = e.path | |
, n = t.length; | |
!n || "file" == e.scheme && 1 == n && V(t[0], !0) || t.pop() | |
}, $ = function(e) { | |
return "." === e || "%2e" === e.toLowerCase() | |
}, ee = {}, te = {}, ne = {}, re = {}, oe = {}, ie = {}, se = {}, ue = {}, ae = {}, ce = {}, le = {}, fe = {}, de = {}, he = {}, pe = {}, ve = {}, _e = {}, ge = {}, je = {}, me = {}, ye = {}, be = function(e, t, n, o) { | |
var i, s, u, a, c, l = n || ee, d = 0, p = "", v = !1, _ = !1, g = !1; | |
for (n || (e.scheme = "", | |
e.username = "", | |
e.password = "", | |
e.host = null, | |
e.port = null, | |
e.path = [], | |
e.query = null, | |
e.fragment = null, | |
e.cannotBeABaseURL = !1, | |
t = t.replace(Q, "")), | |
t = t.replace(k, ""), | |
i = h(t); d <= i.length; ) { | |
switch (s = i[d], | |
l) { | |
case ee: | |
if (!s || !L.test(s)) { | |
if (n) | |
return "Invalid scheme"; | |
l = ne; | |
continue | |
} | |
p += s.toLowerCase(), | |
l = te; | |
break; | |
case te: | |
if (s && (R.test(s) || "+" == s || "-" == s || "." == s)) | |
p += s.toLowerCase(); | |
else { | |
if (":" != s) { | |
if (n) | |
return "Invalid scheme"; | |
p = "", | |
l = ne, | |
d = 0; | |
continue | |
} | |
if (n && (q(e) != f(z, p) || "file" == p && (G(e) || null !== e.port) || "file" == e.scheme && !e.host)) | |
return; | |
if (e.scheme = p, | |
n) | |
return void (q(e) && z[e.scheme] == e.port && (e.port = null)); | |
p = "", | |
"file" == e.scheme ? l = he : q(e) && o && o.scheme == e.scheme ? l = re : q(e) ? l = ue : "/" == i[d + 1] ? (l = oe, | |
d++) : (e.cannotBeABaseURL = !0, | |
e.path.push(""), | |
l = je) | |
} | |
break; | |
case ne: | |
if (!o || o.cannotBeABaseURL && "#" != s) | |
return "Invalid scheme"; | |
if (o.cannotBeABaseURL && "#" == s) { | |
e.scheme = o.scheme, | |
e.path = o.path.slice(), | |
e.query = o.query, | |
e.fragment = "", | |
e.cannotBeABaseURL = !0, | |
l = ye; | |
break | |
} | |
l = "file" == o.scheme ? he : ie; | |
continue; | |
case re: | |
if ("/" != s || "/" != i[d + 1]) { | |
l = ie; | |
continue | |
} | |
l = ae, | |
d++; | |
break; | |
case oe: | |
if ("/" == s) { | |
l = ce; | |
break | |
} | |
l = ge; | |
continue; | |
case ie: | |
if (e.scheme = o.scheme, | |
s == r) | |
e.username = o.username, | |
e.password = o.password, | |
e.host = o.host, | |
e.port = o.port, | |
e.path = o.path.slice(), | |
e.query = o.query; | |
else if ("/" == s || "\\" == s && q(e)) | |
l = se; | |
else if ("?" == s) | |
e.username = o.username, | |
e.password = o.password, | |
e.host = o.host, | |
e.port = o.port, | |
e.path = o.path.slice(), | |
e.query = "", | |
l = me; | |
else { | |
if ("#" != s) { | |
e.username = o.username, | |
e.password = o.password, | |
e.host = o.host, | |
e.port = o.port, | |
e.path = o.path.slice(), | |
e.path.pop(), | |
l = ge; | |
continue | |
} | |
e.username = o.username, | |
e.password = o.password, | |
e.host = o.host, | |
e.port = o.port, | |
e.path = o.path.slice(), | |
e.query = o.query, | |
e.fragment = "", | |
l = ye | |
} | |
break; | |
case se: | |
if (!q(e) || "/" != s && "\\" != s) { | |
if ("/" != s) { | |
e.username = o.username, | |
e.password = o.password, | |
e.host = o.host, | |
e.port = o.port, | |
l = ge; | |
continue | |
} | |
l = ce | |
} else | |
l = ae; | |
break; | |
case ue: | |
if (l = ae, | |
"/" != s || "/" != p.charAt(d + 1)) | |
continue; | |
d++; | |
break; | |
case ae: | |
if ("/" != s && "\\" != s) { | |
l = ce; | |
continue | |
} | |
break; | |
case ce: | |
if ("@" == s) { | |
v && (p = "%40" + p), | |
v = !0, | |
u = h(p); | |
for (var j = 0; j < u.length; j++) { | |
var m = u[j]; | |
if (":" != m || g) { | |
var y = W(m, K); | |
g ? e.password += y : e.username += y | |
} else | |
g = !0 | |
} | |
p = "" | |
} else if (s == r || "/" == s || "?" == s || "#" == s || "\\" == s && q(e)) { | |
if (v && "" == p) | |
return "Invalid authority"; | |
d -= h(p).length + 1, | |
p = "", | |
l = le | |
} else | |
p += s; | |
break; | |
case le: | |
case fe: | |
if (n && "file" == e.scheme) { | |
l = ve; | |
continue | |
} | |
if (":" != s || _) { | |
if (s == r || "/" == s || "?" == s || "#" == s || "\\" == s && q(e)) { | |
if (q(e) && "" == p) | |
return "Invalid host"; | |
if (n && "" == p && (G(e) || null !== e.port)) | |
return; | |
if (a = P(e, p)) | |
return a; | |
if (p = "", | |
l = _e, | |
n) | |
return; | |
continue | |
} | |
"[" == s ? _ = !0 : "]" == s && (_ = !1), | |
p += s | |
} else { | |
if ("" == p) | |
return "Invalid host"; | |
if (a = P(e, p)) | |
return a; | |
if (p = "", | |
l = de, | |
n == fe) | |
return | |
} | |
break; | |
case de: | |
if (!S.test(s)) { | |
if (s == r || "/" == s || "?" == s || "#" == s || "\\" == s && q(e) || n) { | |
if ("" != p) { | |
var b = parseInt(p, 10); | |
if (b > 65535) | |
return "Invalid port"; | |
e.port = q(e) && b === z[e.scheme] ? null : b, | |
p = "" | |
} | |
if (n) | |
return; | |
l = _e; | |
continue | |
} | |
return "Invalid port" | |
} | |
p += s; | |
break; | |
case he: | |
if (e.scheme = "file", | |
"/" == s || "\\" == s) | |
l = pe; | |
else { | |
if (!o || "file" != o.scheme) { | |
l = ge; | |
continue | |
} | |
if (s == r) | |
e.host = o.host, | |
e.path = o.path.slice(), | |
e.query = o.query; | |
else if ("?" == s) | |
e.host = o.host, | |
e.path = o.path.slice(), | |
e.query = "", | |
l = me; | |
else { | |
if ("#" != s) { | |
X(i.slice(d).join("")) || (e.host = o.host, | |
e.path = o.path.slice(), | |
J(e)), | |
l = ge; | |
continue | |
} | |
e.host = o.host, | |
e.path = o.path.slice(), | |
e.query = o.query, | |
e.fragment = "", | |
l = ye | |
} | |
} | |
break; | |
case pe: | |
if ("/" == s || "\\" == s) { | |
l = ve; | |
break | |
} | |
o && "file" == o.scheme && !X(i.slice(d).join("")) && (V(o.path[0], !0) ? e.path.push(o.path[0]) : e.host = o.host), | |
l = ge; | |
continue; | |
case ve: | |
if (s == r || "/" == s || "\\" == s || "?" == s || "#" == s) { | |
if (!n && V(p)) | |
l = ge; | |
else if ("" == p) { | |
if (e.host = "", | |
n) | |
return; | |
l = _e | |
} else { | |
if (a = P(e, p)) | |
return a; | |
if ("localhost" == e.host && (e.host = ""), | |
n) | |
return; | |
p = "", | |
l = _e | |
} | |
continue | |
} | |
p += s; | |
break; | |
case _e: | |
if (q(e)) { | |
if (l = ge, | |
"/" != s && "\\" != s) | |
continue | |
} else if (n || "?" != s) | |
if (n || "#" != s) { | |
if (s != r && (l = ge, | |
"/" != s)) | |
continue | |
} else | |
e.fragment = "", | |
l = ye; | |
else | |
e.query = "", | |
l = me; | |
break; | |
case ge: | |
if (s == r || "/" == s || "\\" == s && q(e) || !n && ("?" == s || "#" == s)) { | |
if (".." === (c = (c = p).toLowerCase()) || "%2e." === c || ".%2e" === c || "%2e%2e" === c ? (J(e), | |
"/" == s || "\\" == s && q(e) || e.path.push("")) : $(p) ? "/" == s || "\\" == s && q(e) || e.path.push("") : ("file" == e.scheme && !e.path.length && V(p) && (e.host && (e.host = ""), | |
p = p.charAt(0) + ":"), | |
e.path.push(p)), | |
p = "", | |
"file" == e.scheme && (s == r || "?" == s || "#" == s)) | |
for (; e.path.length > 1 && "" === e.path[0]; ) | |
e.path.shift(); | |
"?" == s ? (e.query = "", | |
l = me) : "#" == s && (e.fragment = "", | |
l = ye) | |
} else | |
p += W(s, Y); | |
break; | |
case je: | |
"?" == s ? (e.query = "", | |
l = me) : "#" == s ? (e.fragment = "", | |
l = ye) : s != r && (e.path[0] += W(s, F)); | |
break; | |
case me: | |
n || "#" != s ? s != r && ("'" == s && q(e) ? e.query += "%27" : e.query += "#" == s ? "%23" : W(s, F)) : (e.fragment = "", | |
l = ye); | |
break; | |
case ye: | |
s != r && (e.fragment += W(s, Z)) | |
} | |
d++ | |
} | |
}, Ee = function(e) { | |
var t, n, r = l(this, Ee, "URL"), o = arguments.length > 1 ? arguments[1] : void 0, s = String(e), u = E(r, { | |
type: "URL" | |
}); | |
if (void 0 !== o) | |
if (o instanceof Ee) | |
t = w(o); | |
else if (n = be(t = {}, String(o))) | |
throw TypeError(n); | |
if (n = be(u, s, null, t)) | |
throw TypeError(n); | |
var a = u.searchParams = new y | |
, c = b(a); | |
c.updateSearchParams(u.query), | |
c.updateURL = function() { | |
u.query = String(a) || null | |
} | |
, | |
i || (r.href = Ae.call(r), | |
r.origin = Ce.call(r), | |
r.protocol = Le.call(r), | |
r.username = Re.call(r), | |
r.password = Se.call(r), | |
r.host = Te.call(r), | |
r.hostname = xe.call(r), | |
r.port = Ie.call(r), | |
r.pathname = Oe.call(r), | |
r.search = Ue.call(r), | |
r.searchParams = Me.call(r), | |
r.hash = Qe.call(r)) | |
}, we = Ee.prototype, Ae = function() { | |
var e = w(this) | |
, t = e.scheme | |
, n = e.username | |
, r = e.password | |
, o = e.host | |
, i = e.port | |
, s = e.path | |
, u = e.query | |
, a = e.fragment | |
, c = t + ":"; | |
return null !== o ? (c += "//", | |
G(e) && (c += n + (r ? ":" + r : "") + "@"), | |
c += B(o), | |
null !== i && (c += ":" + i)) : "file" == t && (c += "//"), | |
c += e.cannotBeABaseURL ? s[0] : s.length ? "/" + s.join("/") : "", | |
null !== u && (c += "?" + u), | |
null !== a && (c += "#" + a), | |
c | |
}, Ce = function() { | |
var e = w(this) | |
, t = e.scheme | |
, n = e.port; | |
if ("blob" == t) | |
try { | |
return new URL(t.path[0]).origin | |
} catch (e) { | |
return "null" | |
} | |
return "file" != t && q(e) ? t + "://" + B(e.host) + (null !== n ? ":" + n : "") : "null" | |
}, Le = function() { | |
return w(this).scheme + ":" | |
}, Re = function() { | |
return w(this).username | |
}, Se = function() { | |
return w(this).password | |
}, Te = function() { | |
var e = w(this) | |
, t = e.host | |
, n = e.port; | |
return null === t ? "" : null === n ? B(t) : B(t) + ":" + n | |
}, xe = function() { | |
var e = w(this).host; | |
return null === e ? "" : B(e) | |
}, Ie = function() { | |
var e = w(this).port; | |
return null === e ? "" : String(e) | |
}, Oe = function() { | |
var e = w(this) | |
, t = e.path; | |
return e.cannotBeABaseURL ? t[0] : t.length ? "/" + t.join("/") : "" | |
}, Ue = function() { | |
var e = w(this).query; | |
return e ? "?" + e : "" | |
}, Me = function() { | |
return w(this).searchParams | |
}, Qe = function() { | |
var e = w(this).fragment; | |
return e ? "#" + e : "" | |
}, ke = function(e, t) { | |
return { | |
get: e, | |
set: t, | |
configurable: !0, | |
enumerable: !0 | |
} | |
}; | |
if (i && a(we, { | |
href: ke(Ae, (function(e) { | |
var t = w(this) | |
, n = String(e) | |
, r = be(t, n); | |
if (r) | |
throw TypeError(r); | |
b(t.searchParams).updateSearchParams(t.query) | |
} | |
)), | |
origin: ke(Ce), | |
protocol: ke(Le, (function(e) { | |
var t = w(this); | |
be(t, String(e) + ":", ee) | |
} | |
)), | |
username: ke(Re, (function(e) { | |
var t = w(this) | |
, n = h(String(e)); | |
if (!H(t)) { | |
t.username = ""; | |
for (var r = 0; r < n.length; r++) | |
t.username += W(n[r], K) | |
} | |
} | |
)), | |
password: ke(Se, (function(e) { | |
var t = w(this) | |
, n = h(String(e)); | |
if (!H(t)) { | |
t.password = ""; | |
for (var r = 0; r < n.length; r++) | |
t.password += W(n[r], K) | |
} | |
} | |
)), | |
host: ke(Te, (function(e) { | |
var t = w(this); | |
t.cannotBeABaseURL || be(t, String(e), le) | |
} | |
)), | |
hostname: ke(xe, (function(e) { | |
var t = w(this); | |
t.cannotBeABaseURL || be(t, String(e), fe) | |
} | |
)), | |
port: ke(Ie, (function(e) { | |
var t = w(this); | |
H(t) || ("" == (e = String(e)) ? t.port = null : be(t, e, de)) | |
} | |
)), | |
pathname: ke(Oe, (function(e) { | |
var t = w(this); | |
t.cannotBeABaseURL || (t.path = [], | |
be(t, e + "", _e)) | |
} | |
)), | |
search: ke(Ue, (function(e) { | |
var t = w(this); | |
"" == (e = String(e)) ? t.query = null : ("?" == e.charAt(0) && (e = e.slice(1)), | |
t.query = "", | |
be(t, e, me)), | |
b(t.searchParams).updateSearchParams(t.query) | |
} | |
)), | |
searchParams: ke(Me), | |
hash: ke(Qe, (function(e) { | |
var t = w(this); | |
"" != (e = String(e)) ? ("#" == e.charAt(0) && (e = e.slice(1)), | |
t.fragment = "", | |
be(t, e, ye)) : t.fragment = null | |
} | |
)) | |
}), | |
c(we, "toJSON", (function() { | |
return Ae.call(this) | |
} | |
), { | |
enumerable: !0 | |
}), | |
c(we, "toString", (function() { | |
return Ae.call(this) | |
} | |
), { | |
enumerable: !0 | |
}), | |
m) { | |
var Pe = m.createObjectURL | |
, Ne = m.revokeObjectURL; | |
Pe && c(Ee, "createObjectURL", (function(e) { | |
return Pe.apply(m, arguments) | |
} | |
)), | |
Ne && c(Ee, "revokeObjectURL", (function(e) { | |
return Ne.apply(m, arguments) | |
} | |
)) | |
} | |
_(Ee, "URL"), | |
o({ | |
global: !0, | |
forced: !s, | |
sham: !i | |
}, { | |
URL: Ee | |
}) | |
}, | |
"./node_modules/crypt/crypt.js": function(e, t) { | |
var n, r; | |
n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", | |
r = { | |
rotl: function(e, t) { | |
return e << t | e >>> 32 - t | |
}, | |
rotr: function(e, t) { | |
return e << 32 - t | e >>> t | |
}, | |
endian: function(e) { | |
if (e.constructor == Number) | |
return 16711935 & r.rotl(e, 8) | 4278255360 & r.rotl(e, 24); | |
for (var t = 0; t < e.length; t++) | |
e[t] = r.endian(e[t]); | |
return e | |
}, | |
randomBytes: function(e) { | |
for (var t = []; e > 0; e--) | |
t.push(Math.floor(256 * Math.random())); | |
return t | |
}, | |
bytesToWords: function(e) { | |
for (var t = [], n = 0, r = 0; n < e.length; n++, | |
r += 8) | |
t[r >>> 5] |= e[n] << 24 - r % 32; | |
return t | |
}, | |
wordsToBytes: function(e) { | |
for (var t = [], n = 0; n < 32 * e.length; n += 8) | |
t.push(e[n >>> 5] >>> 24 - n % 32 & 255); | |
return t | |
}, | |
bytesToHex: function(e) { | |
for (var t = [], n = 0; n < e.length; n++) | |
t.push((e[n] >>> 4).toString(16)), | |
t.push((15 & e[n]).toString(16)); | |
return t.join("") | |
}, | |
hexToBytes: function(e) { | |
for (var t = [], n = 0; n < e.length; n += 2) | |
t.push(parseInt(e.substr(n, 2), 16)); | |
return t | |
}, | |
bytesToBase64: function(e) { | |
for (var t = [], r = 0; r < e.length; r += 3) | |
for (var o = e[r] << 16 | e[r + 1] << 8 | e[r + 2], i = 0; i < 4; i++) | |
8 * r + 6 * i <= 8 * e.length ? t.push(n.charAt(o >>> 6 * (3 - i) & 63)) : t.push("="); | |
return t.join("") | |
}, | |
base64ToBytes: function(e) { | |
e = e.replace(/[^A-Z0-9+\/]/gi, ""); | |
for (var t = [], r = 0, o = 0; r < e.length; o = ++r % 4) | |
0 != o && t.push((n.indexOf(e.charAt(r - 1)) & Math.pow(2, -2 * o + 8) - 1) << 2 * o | n.indexOf(e.charAt(r)) >>> 6 - 2 * o); | |
return t | |
} | |
}, | |
e.exports = r | |
}, | |
"./node_modules/ieee754/index.js": function(e, t) { | |
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | |
t.read = function(e, t, n, r, o) { | |
var i, s, u = 8 * o - r - 1, a = (1 << u) - 1, c = a >> 1, l = -7, f = n ? o - 1 : 0, d = n ? -1 : 1, h = e[t + f]; | |
for (f += d, | |
i = h & (1 << -l) - 1, | |
h >>= -l, | |
l += u; l > 0; i = 256 * i + e[t + f], | |
f += d, | |
l -= 8) | |
; | |
for (s = i & (1 << -l) - 1, | |
i >>= -l, | |
l += r; l > 0; s = 256 * s + e[t + f], | |
f += d, | |
l -= 8) | |
; | |
if (0 === i) | |
i = 1 - c; | |
else { | |
if (i === a) | |
return s ? NaN : 1 / 0 * (h ? -1 : 1); | |
s += Math.pow(2, r), | |
i -= c | |
} | |
return (h ? -1 : 1) * s * Math.pow(2, i - r) | |
} | |
, | |
t.write = function(e, t, n, r, o, i) { | |
var s, u, a, c = 8 * i - o - 1, l = (1 << c) - 1, f = l >> 1, d = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, h = r ? 0 : i - 1, p = r ? 1 : -1, v = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; | |
for (t = Math.abs(t), | |
isNaN(t) || t === 1 / 0 ? (u = isNaN(t) ? 1 : 0, | |
s = l) : (s = Math.floor(Math.log(t) / Math.LN2), | |
t * (a = Math.pow(2, -s)) < 1 && (s--, | |
a *= 2), | |
(t += s + f >= 1 ? d / a : d * Math.pow(2, 1 - f)) * a >= 2 && (s++, | |
a /= 2), | |
s + f >= l ? (u = 0, | |
s = l) : s + f >= 1 ? (u = (t * a - 1) * Math.pow(2, o), | |
s += f) : (u = t * Math.pow(2, f - 1) * Math.pow(2, o), | |
s = 0)); o >= 8; e[n + h] = 255 & u, | |
h += p, | |
u /= 256, | |
o -= 8) | |
; | |
for (s = s << o | u, | |
c += o; c > 0; e[n + h] = 255 & s, | |
h += p, | |
s /= 256, | |
c -= 8) | |
; | |
e[n + h - p] |= 128 * v | |
} | |
}, | |
"./node_modules/isarray/index.js": function(e, t) { | |
var n = {}.toString; | |
e.exports = Array.isArray || function(e) { | |
return "[object Array]" == n.call(e) | |
} | |
}, | |
"./node_modules/lodash/lodash.js": function(e, t, n) { | |
(function(e, r) { | |
var o; | |
/** | |
* @license | |
* Lodash <https://lodash.com/> | |
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/> | |
* Released under MIT license <https://lodash.com/license> | |
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | |
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
*/ | |
(function() { | |
var i = "Expected a function" | |
, s = "__lodash_placeholder__" | |
, u = [["ary", 128], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", 32], ["partialRight", 64], ["rearg", 256]] | |
, a = "[object Arguments]" | |
, c = "[object Array]" | |
, l = "[object Boolean]" | |
, f = "[object Date]" | |
, d = "[object Error]" | |
, h = "[object Function]" | |
, p = "[object GeneratorFunction]" | |
, v = "[object Map]" | |
, _ = "[object Number]" | |
, g = "[object Object]" | |
, j = "[object RegExp]" | |
, m = "[object Set]" | |
, y = "[object String]" | |
, b = "[object Symbol]" | |
, E = "[object WeakMap]" | |
, w = "[object ArrayBuffer]" | |
, A = "[object DataView]" | |
, C = "[object Float32Array]" | |
, L = "[object Float64Array]" | |
, R = "[object Int8Array]" | |
, S = "[object Int16Array]" | |
, T = "[object Int32Array]" | |
, x = "[object Uint8Array]" | |
, I = "[object Uint16Array]" | |
, O = "[object Uint32Array]" | |
, U = /\b__p \+= '';/g | |
, M = /\b(__p \+=) '' \+/g | |
, Q = /(__e\(.*?\)|\b__t\)) \+\n'';/g | |
, k = /&(?:amp|lt|gt|quot|#39);/g | |
, P = /[&<>"']/g | |
, N = RegExp(k.source) | |
, D = RegExp(P.source) | |
, B = /<%-([\s\S]+?)%>/g | |
, F = /<%([\s\S]+?)%>/g | |
, Z = /<%=([\s\S]+?)%>/g | |
, Y = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/ | |
, K = /^\w*$/ | |
, W = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g | |
, z = /[\\^$.*+?()[\]{}|]/g | |
, q = RegExp(z.source) | |
, G = /^\s+|\s+$/g | |
, H = /^\s+/ | |
, V = /\s+$/ | |
, X = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/ | |
, J = /\{\n\/\* \[wrapped with (.+)\] \*/ | |
, $ = /,? & / | |
, ee = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g | |
, te = /\\(\\)?/g | |
, ne = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g | |
, re = /\w*$/ | |
, oe = /^[-+]0x[0-9a-f]+$/i | |
, ie = /^0b[01]+$/i | |
, se = /^\[object .+?Constructor\]$/ | |
, ue = /^0o[0-7]+$/i | |
, ae = /^(?:0|[1-9]\d*)$/ | |
, ce = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g | |
, le = /($^)/ | |
, fe = /['\n\r\u2028\u2029\\]/g | |
, de = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff" | |
, he = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000" | |
, pe = "[\\ud800-\\udfff]" | |
, ve = "[" + he + "]" | |
, _e = "[" + de + "]" | |
, ge = "\\d+" | |
, je = "[\\u2700-\\u27bf]" | |
, me = "[a-z\\xdf-\\xf6\\xf8-\\xff]" | |
, ye = "[^\\ud800-\\udfff" + he + ge + "\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]" | |
, be = "\\ud83c[\\udffb-\\udfff]" | |
, Ee = "[^\\ud800-\\udfff]" | |
, we = "(?:\\ud83c[\\udde6-\\uddff]){2}" | |
, Ae = "[\\ud800-\\udbff][\\udc00-\\udfff]" | |
, Ce = "[A-Z\\xc0-\\xd6\\xd8-\\xde]" | |
, Le = "(?:" + me + "|" + ye + ")" | |
, Re = "(?:" + Ce + "|" + ye + ")" | |
, Se = "(?:" + _e + "|" + be + ")" + "?" | |
, Te = "[\\ufe0e\\ufe0f]?" + Se + ("(?:\\u200d(?:" + [Ee, we, Ae].join("|") + ")[\\ufe0e\\ufe0f]?" + Se + ")*") | |
, xe = "(?:" + [je, we, Ae].join("|") + ")" + Te | |
, Ie = "(?:" + [Ee + _e + "?", _e, we, Ae, pe].join("|") + ")" | |
, Oe = RegExp("['’]", "g") | |
, Ue = RegExp(_e, "g") | |
, Me = RegExp(be + "(?=" + be + ")|" + Ie + Te, "g") | |
, Qe = RegExp([Ce + "?" + me + "+(?:['’](?:d|ll|m|re|s|t|ve))?(?=" + [ve, Ce, "$"].join("|") + ")", Re + "+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=" + [ve, Ce + Le, "$"].join("|") + ")", Ce + "?" + Le + "+(?:['’](?:d|ll|m|re|s|t|ve))?", Ce + "+(?:['’](?:D|LL|M|RE|S|T|VE))?", "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", ge, xe].join("|"), "g") | |
, ke = RegExp("[\\u200d\\ud800-\\udfff" + de + "\\ufe0e\\ufe0f]") | |
, Pe = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/ | |
, Ne = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"] | |
, De = -1 | |
, Be = {}; | |
Be[C] = Be[L] = Be[R] = Be[S] = Be[T] = Be[x] = Be["[object Uint8ClampedArray]"] = Be[I] = Be[O] = !0, | |
Be[a] = Be[c] = Be[w] = Be[l] = Be[A] = Be[f] = Be[d] = Be[h] = Be[v] = Be[_] = Be[g] = Be[j] = Be[m] = Be[y] = Be[E] = !1; | |
var Fe = {}; | |
Fe[a] = Fe[c] = Fe[w] = Fe[A] = Fe[l] = Fe[f] = Fe[C] = Fe[L] = Fe[R] = Fe[S] = Fe[T] = Fe[v] = Fe[_] = Fe[g] = Fe[j] = Fe[m] = Fe[y] = Fe[b] = Fe[x] = Fe["[object Uint8ClampedArray]"] = Fe[I] = Fe[O] = !0, | |
Fe[d] = Fe[h] = Fe[E] = !1; | |
var Ze = { | |
"\\": "\\", | |
"'": "'", | |
"\n": "n", | |
"\r": "r", | |
"\u2028": "u2028", | |
"\u2029": "u2029" | |
} | |
, Ye = parseFloat | |
, Ke = parseInt | |
, We = "object" == typeof e && e && e.Object === Object && e | |
, ze = "object" == typeof self && self && self.Object === Object && self | |
, qe = We || ze || Function("return this")() | |
, Ge = t && !t.nodeType && t | |
, He = Ge && "object" == typeof r && r && !r.nodeType && r | |
, Ve = He && He.exports === Ge | |
, Xe = Ve && We.process | |
, Je = function() { | |
try { | |
var e = He && He.require && He.require("util").types; | |
return e || Xe && Xe.binding && Xe.binding("util") | |
} catch (e) {} | |
}() | |
, $e = Je && Je.isArrayBuffer | |
, et = Je && Je.isDate | |
, tt = Je && Je.isMap | |
, nt = Je && Je.isRegExp | |
, rt = Je && Je.isSet | |
, ot = Je && Je.isTypedArray; | |
function it(e, t, n) { | |
switch (n.length) { | |
case 0: | |
return e.call(t); | |
case 1: | |
return e.call(t, n[0]); | |
case 2: | |
return e.call(t, n[0], n[1]); | |
case 3: | |
return e.call(t, n[0], n[1], n[2]) | |
} | |
return e.apply(t, n) | |
} | |
function st(e, t, n, r) { | |
for (var o = -1, i = null == e ? 0 : e.length; ++o < i; ) { | |
var s = e[o]; | |
t(r, s, n(s), e) | |
} | |
return r | |
} | |
function ut(e, t) { | |
for (var n = -1, r = null == e ? 0 : e.length; ++n < r && !1 !== t(e[n], n, e); ) | |
; | |
return e | |
} | |
function at(e, t) { | |
for (var n = null == e ? 0 : e.length; n-- && !1 !== t(e[n], n, e); ) | |
; | |
return e | |
} | |
function ct(e, t) { | |
for (var n = -1, r = null == e ? 0 : e.length; ++n < r; ) | |
if (!t(e[n], n, e)) | |
return !1; | |
return !0 | |
} | |
function lt(e, t) { | |
for (var n = -1, r = null == e ? 0 : e.length, o = 0, i = []; ++n < r; ) { | |
var s = e[n]; | |
t(s, n, e) && (i[o++] = s) | |
} | |
return i | |
} | |
function ft(e, t) { | |
return !!(null == e ? 0 : e.length) && bt(e, t, 0) > -1 | |
} | |
function dt(e, t, n) { | |
for (var r = -1, o = null == e ? 0 : e.length; ++r < o; ) | |
if (n(t, e[r])) | |
return !0; | |
return !1 | |
} | |
function ht(e, t) { | |
for (var n = -1, r = null == e ? 0 : e.length, o = Array(r); ++n < r; ) | |
o[n] = t(e[n], n, e); | |
return o | |
} | |
function pt(e, t) { | |
for (var n = -1, r = t.length, o = e.length; ++n < r; ) | |
e[o + n] = t[n]; | |
return e | |
} | |
function vt(e, t, n, r) { | |
var o = -1 | |
, i = null == e ? 0 : e.length; | |
for (r && i && (n = e[++o]); ++o < i; ) | |
n = t(n, e[o], o, e); | |
return n | |
} | |
function _t(e, t, n, r) { | |
var o = null == e ? 0 : e.length; | |
for (r && o && (n = e[--o]); o--; ) | |
n = t(n, e[o], o, e); | |
return n | |
} | |
function gt(e, t) { | |
for (var n = -1, r = null == e ? 0 : e.length; ++n < r; ) | |
if (t(e[n], n, e)) | |
return !0; | |
return !1 | |
} | |
var jt = Ct("length"); | |
function mt(e, t, n) { | |
var r; | |
return n(e, (function(e, n, o) { | |
if (t(e, n, o)) | |
return r = n, | |
!1 | |
} | |
)), | |
r | |
} | |
function yt(e, t, n, r) { | |
for (var o = e.length, i = n + (r ? 1 : -1); r ? i-- : ++i < o; ) | |
if (t(e[i], i, e)) | |
return i; | |
return -1 | |
} | |
function bt(e, t, n) { | |
return t == t ? function(e, t, n) { | |
var r = n - 1 | |
, o = e.length; | |
for (; ++r < o; ) | |
if (e[r] === t) | |
return r; | |
return -1 | |
}(e, t, n) : yt(e, wt, n) | |
} | |
function Et(e, t, n, r) { | |
for (var o = n - 1, i = e.length; ++o < i; ) | |
if (r(e[o], t)) | |
return o; | |
return -1 | |
} | |
function wt(e) { | |
return e != e | |
} | |
function At(e, t) { | |
var n = null == e ? 0 : e.length; | |
return n ? St(e, t) / n : NaN | |
} | |
function Ct(e) { | |
return function(t) { | |
return null == t ? void 0 : t[e] | |
} | |
} | |
function Lt(e) { | |
return function(t) { | |
return null == e ? void 0 : e[t] | |
} | |
} | |
function Rt(e, t, n, r, o) { | |
return o(e, (function(e, o, i) { | |
n = r ? (r = !1, | |
e) : t(n, e, o, i) | |
} | |
)), | |
n | |
} | |
function St(e, t) { | |
for (var n, r = -1, o = e.length; ++r < o; ) { | |
var i = t(e[r]); | |
void 0 !== i && (n = void 0 === n ? i : n + i) | |
} | |
return n | |
} | |
function Tt(e, t) { | |
for (var n = -1, r = Array(e); ++n < e; ) | |
r[n] = t(n); | |
return r | |
} | |
function xt(e) { | |
return function(t) { | |
return e(t) | |
} | |
} | |
function It(e, t) { | |
return ht(t, (function(t) { | |
return e[t] | |
} | |
)) | |
} | |
function Ot(e, t) { | |
return e.has(t) | |
} | |
function Ut(e, t) { | |
for (var n = -1, r = e.length; ++n < r && bt(t, e[n], 0) > -1; ) | |
; | |
return n | |
} | |
function Mt(e, t) { | |
for (var n = e.length; n-- && bt(t, e[n], 0) > -1; ) | |
; | |
return n | |
} | |
function Qt(e, t) { | |
for (var n = e.length, r = 0; n--; ) | |
e[n] === t && ++r; | |
return r | |
} | |
var kt = Lt({ | |
"À": "A", | |
"Á": "A", | |
"Â": "A", | |
"Ã": "A", | |
"Ä": "A", | |
"Å": "A", | |
"à": "a", | |
"á": "a", | |
"â": "a", | |
"ã": "a", | |
"ä": "a", | |
"å": "a", | |
"Ç": "C", | |
"ç": "c", | |
"Ð": "D", | |
"ð": "d", | |
"È": "E", | |
"É": "E", | |
"Ê": "E", | |
"Ë": "E", | |
"è": "e", | |
"é": "e", | |
"ê": "e", | |
"ë": "e", | |
"Ì": "I", | |
"Í": "I", | |
"Î": "I", | |
"Ï": "I", | |
"ì": "i", | |
"í": "i", | |
"î": "i", | |
"ï": "i", | |
"Ñ": "N", | |
"ñ": "n", | |
"Ò": "O", | |
"Ó": "O", | |
"Ô": "O", | |
"Õ": "O", | |
"Ö": "O", | |
"Ø": "O", | |
"ò": "o", | |
"ó": "o", | |
"ô": "o", | |
"õ": "o", | |
"ö": "o", | |
"ø": "o", | |
"Ù": "U", | |
"Ú": "U", | |
"Û": "U", | |
"Ü": "U", | |
"ù": "u", | |
"ú": "u", | |
"û": "u", | |
"ü": "u", | |
"Ý": "Y", | |
"ý": "y", | |
"ÿ": "y", | |
"Æ": "Ae", | |
"æ": "ae", | |
"Þ": "Th", | |
"þ": "th", | |
"ß": "ss", | |
"Ā": "A", | |
"Ă": "A", | |
"Ą": "A", | |
"ā": "a", | |
"ă": "a", | |
"ą": "a", | |
"Ć": "C", | |
"Ĉ": "C", | |
"Ċ": "C", | |
"Č": "C", | |
"ć": "c", | |
"ĉ": "c", | |
"ċ": "c", | |
"č": "c", | |
"Ď": "D", | |
"Đ": "D", | |
"ď": "d", | |
"đ": "d", | |
"Ē": "E", | |
"Ĕ": "E", | |
"Ė": "E", | |
"Ę": "E", | |
"Ě": "E", | |
"ē": "e", | |
"ĕ": "e", | |
"ė": "e", | |
"ę": "e", | |
"ě": "e", | |
"Ĝ": "G", | |
"Ğ": "G", | |
"Ġ": "G", | |
"Ģ": "G", | |
"ĝ": "g", | |
"ğ": "g", | |
"ġ": "g", | |
"ģ": "g", | |
"Ĥ": "H", | |
"Ħ": "H", | |
"ĥ": "h", | |
"ħ": "h", | |
"Ĩ": "I", | |
"Ī": "I", | |
"Ĭ": "I", | |
"Į": "I", | |
"İ": "I", | |
"ĩ": "i", | |
"ī": "i", | |
"ĭ": "i", | |
"į": "i", | |
"ı": "i", | |
"Ĵ": "J", | |
"ĵ": "j", | |
"Ķ": "K", | |
"ķ": "k", | |
"ĸ": "k", | |
"Ĺ": "L", | |
"Ļ": "L", | |
"Ľ": "L", | |
"Ŀ": "L", | |
"Ł": "L", | |
"ĺ": "l", | |
"ļ": "l", | |
"ľ": "l", | |
"ŀ": "l", | |
"ł": "l", | |
"Ń": "N", | |
"Ņ": "N", | |
"Ň": "N", | |
"Ŋ": "N", | |
"ń": "n", | |
"ņ": "n", | |
"ň": "n", | |
"ŋ": "n", | |
"Ō": "O", | |
"Ŏ": "O", | |
"Ő": "O", | |
"ō": "o", | |
"ŏ": "o", | |
"ő": "o", | |
"Ŕ": "R", | |
"Ŗ": "R", | |
"Ř": "R", | |
"ŕ": "r", | |
"ŗ": "r", | |
"ř": "r", | |
"Ś": "S", | |
"Ŝ": "S", | |
"Ş": "S", | |
"Š": "S", | |
"ś": "s", | |
"ŝ": "s", | |
"ş": "s", | |
"š": "s", | |
"Ţ": "T", | |
"Ť": "T", | |
"Ŧ": "T", | |
"ţ": "t", | |
"ť": "t", | |
"ŧ": "t", | |
"Ũ": "U", | |
"Ū": "U", | |
"Ŭ": "U", | |
"Ů": "U", | |
"Ű": "U", | |
"Ų": "U", | |
"ũ": "u", | |
"ū": "u", | |
"ŭ": "u", | |
"ů": "u", | |
"ű": "u", | |
"ų": "u", | |
"Ŵ": "W", | |
"ŵ": "w", | |
"Ŷ": "Y", | |
"ŷ": "y", | |
"Ÿ": "Y", | |
"Ź": "Z", | |
"Ż": "Z", | |
"Ž": "Z", | |
"ź": "z", | |
"ż": "z", | |
"ž": "z", | |
"IJ": "IJ", | |
"ij": "ij", | |
"Œ": "Oe", | |
"œ": "oe", | |
"ʼn": "'n", | |
"ſ": "s" | |
}) | |
, Pt = Lt({ | |
"&": "&", | |
"<": "<", | |
">": ">", | |
'"': """, | |
"'": "'" | |
}); | |
function Nt(e) { | |
return "\\" + Ze[e] | |
} | |
function Dt(e) { | |
return ke.test(e) | |
} | |
function Bt(e) { | |
var t = -1 | |
, n = Array(e.size); | |
return e.forEach((function(e, r) { | |
n[++t] = [r, e] | |
} | |
)), | |
n | |
} | |
function Ft(e, t) { | |
return function(n) { | |
return e(t(n)) | |
} | |
} | |
function Zt(e, t) { | |
for (var n = -1, r = e.length, o = 0, i = []; ++n < r; ) { | |
var u = e[n]; | |
u !== t && u !== s || (e[n] = s, | |
i[o++] = n) | |
} | |
return i | |
} | |
function Yt(e) { | |
var t = -1 | |
, n = Array(e.size); | |
return e.forEach((function(e) { | |
n[++t] = e | |
} | |
)), | |
n | |
} | |
function Kt(e) { | |
var t = -1 | |
, n = Array(e.size); | |
return e.forEach((function(e) { | |
n[++t] = [e, e] | |
} | |
)), | |
n | |
} | |
function Wt(e) { | |
return Dt(e) ? function(e) { | |
var t = Me.lastIndex = 0; | |
for (; Me.test(e); ) | |
++t; | |
return t | |
}(e) : jt(e) | |
} | |
function zt(e) { | |
return Dt(e) ? function(e) { | |
return e.match(Me) || [] | |
}(e) : function(e) { | |
return e.split("") | |
}(e) | |
} | |
var qt = Lt({ | |
"&": "&", | |
"<": "<", | |
">": ">", | |
""": '"', | |
"'": "'" | |
}); | |
var Gt = function e(t) { | |
var n, r = (t = null == t ? qe : Gt.defaults(qe.Object(), t, Gt.pick(qe, Ne))).Array, o = t.Date, de = t.Error, he = t.Function, pe = t.Math, ve = t.Object, _e = t.RegExp, ge = t.String, je = t.TypeError, me = r.prototype, ye = he.prototype, be = ve.prototype, Ee = t["__core-js_shared__"], we = ye.toString, Ae = be.hasOwnProperty, Ce = 0, Le = (n = /[^.]+$/.exec(Ee && Ee.keys && Ee.keys.IE_PROTO || "")) ? "Symbol(src)_1." + n : "", Re = be.toString, Se = we.call(ve), Te = qe._, xe = _e("^" + we.call(Ae).replace(z, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), Ie = Ve ? t.Buffer : void 0, Me = t.Symbol, ke = t.Uint8Array, Ze = Ie ? Ie.allocUnsafe : void 0, We = Ft(ve.getPrototypeOf, ve), ze = ve.create, Ge = be.propertyIsEnumerable, He = me.splice, Xe = Me ? Me.isConcatSpreadable : void 0, Je = Me ? Me.iterator : void 0, jt = Me ? Me.toStringTag : void 0, Lt = function() { | |
try { | |
var e = ei(ve, "defineProperty"); | |
return e({}, "", {}), | |
e | |
} catch (e) {} | |
}(), Ht = t.clearTimeout !== qe.clearTimeout && t.clearTimeout, Vt = o && o.now !== qe.Date.now && o.now, Xt = t.setTimeout !== qe.setTimeout && t.setTimeout, Jt = pe.ceil, $t = pe.floor, en = ve.getOwnPropertySymbols, tn = Ie ? Ie.isBuffer : void 0, nn = t.isFinite, rn = me.join, on = Ft(ve.keys, ve), sn = pe.max, un = pe.min, an = o.now, cn = t.parseInt, ln = pe.random, fn = me.reverse, dn = ei(t, "DataView"), hn = ei(t, "Map"), pn = ei(t, "Promise"), vn = ei(t, "Set"), _n = ei(t, "WeakMap"), gn = ei(ve, "create"), jn = _n && new _n, mn = {}, yn = Ri(dn), bn = Ri(hn), En = Ri(pn), wn = Ri(vn), An = Ri(_n), Cn = Me ? Me.prototype : void 0, Ln = Cn ? Cn.valueOf : void 0, Rn = Cn ? Cn.toString : void 0; | |
function Sn(e) { | |
if (Ks(e) && !Us(e) && !(e instanceof On)) { | |
if (e instanceof In) | |
return e; | |
if (Ae.call(e, "__wrapped__")) | |
return Si(e) | |
} | |
return new In(e) | |
} | |
var Tn = function() { | |
function e() {} | |
return function(t) { | |
if (!Ys(t)) | |
return {}; | |
if (ze) | |
return ze(t); | |
e.prototype = t; | |
var n = new e; | |
return e.prototype = void 0, | |
n | |
} | |
}(); | |
function xn() {} | |
function In(e, t) { | |
this.__wrapped__ = e, | |
this.__actions__ = [], | |
this.__chain__ = !!t, | |
this.__index__ = 0, | |
this.__values__ = void 0 | |
} | |
function On(e) { | |
this.__wrapped__ = e, | |
this.__actions__ = [], | |
this.__dir__ = 1, | |
this.__filtered__ = !1, | |
this.__iteratees__ = [], | |
this.__takeCount__ = 4294967295, | |
this.__views__ = [] | |
} | |
function Un(e) { | |
var t = -1 | |
, n = null == e ? 0 : e.length; | |
for (this.clear(); ++t < n; ) { | |
var r = e[t]; | |
this.set(r[0], r[1]) | |
} | |
} | |
function Mn(e) { | |
var t = -1 | |
, n = null == e ? 0 : e.length; | |
for (this.clear(); ++t < n; ) { | |
var r = e[t]; | |
this.set(r[0], r[1]) | |
} | |
} | |
function Qn(e) { | |
var t = -1 | |
, n = null == e ? 0 : e.length; | |
for (this.clear(); ++t < n; ) { | |
var r = e[t]; | |
this.set(r[0], r[1]) | |
} | |
} | |
function kn(e) { | |
var t = -1 | |
, n = null == e ? 0 : e.length; | |
for (this.__data__ = new Qn; ++t < n; ) | |
this.add(e[t]) | |
} | |
function Pn(e) { | |
var t = this.__data__ = new Mn(e); | |
this.size = t.size | |
} | |
function Nn(e, t) { | |
var n = Us(e) | |
, r = !n && Os(e) | |
, o = !n && !r && Ps(e) | |
, i = !n && !r && !o && Js(e) | |
, s = n || r || o || i | |
, u = s ? Tt(e.length, ge) : [] | |
, a = u.length; | |
for (var c in e) | |
!t && !Ae.call(e, c) || s && ("length" == c || o && ("offset" == c || "parent" == c) || i && ("buffer" == c || "byteLength" == c || "byteOffset" == c) || ui(c, a)) || u.push(c); | |
return u | |
} | |
function Dn(e) { | |
var t = e.length; | |
return t ? e[kr(0, t - 1)] : void 0 | |
} | |
function Bn(e, t) { | |
return Ai(jo(e), Hn(t, 0, e.length)) | |
} | |
function Fn(e) { | |
return Ai(jo(e)) | |
} | |
function Zn(e, t, n) { | |
(void 0 !== n && !Ts(e[t], n) || void 0 === n && !(t in e)) && qn(e, t, n) | |
} | |
function Yn(e, t, n) { | |
var r = e[t]; | |
Ae.call(e, t) && Ts(r, n) && (void 0 !== n || t in e) || qn(e, t, n) | |
} | |
function Kn(e, t) { | |
for (var n = e.length; n--; ) | |
if (Ts(e[n][0], t)) | |
return n; | |
return -1 | |
} | |
function Wn(e, t, n, r) { | |
return er(e, (function(e, o, i) { | |
t(r, e, n(e), i) | |
} | |
)), | |
r | |
} | |
function zn(e, t) { | |
return e && mo(t, yu(t), e) | |
} | |
function qn(e, t, n) { | |
"__proto__" == t && Lt ? Lt(e, t, { | |
configurable: !0, | |
enumerable: !0, | |
value: n, | |
writable: !0 | |
}) : e[t] = n | |
} | |
function Gn(e, t) { | |
for (var n = -1, o = t.length, i = r(o), s = null == e; ++n < o; ) | |
i[n] = s ? void 0 : vu(e, t[n]); | |
return i | |
} | |
function Hn(e, t, n) { | |
return e == e && (void 0 !== n && (e = e <= n ? e : n), | |
void 0 !== t && (e = e >= t ? e : t)), | |
e | |
} | |
function Vn(e, t, n, r, o, i) { | |
var s, u = 1 & t, c = 2 & t, d = 4 & t; | |
if (n && (s = o ? n(e, r, o, i) : n(e)), | |
void 0 !== s) | |
return s; | |
if (!Ys(e)) | |
return e; | |
var E = Us(e); | |
if (E) { | |
if (s = function(e) { | |
var t = e.length | |
, n = new e.constructor(t); | |
t && "string" == typeof e[0] && Ae.call(e, "index") && (n.index = e.index, | |
n.input = e.input); | |
return n | |
}(e), | |
!u) | |
return jo(e, s) | |
} else { | |
var U = ri(e) | |
, M = U == h || U == p; | |
if (Ps(e)) | |
return fo(e, u); | |
if (U == g || U == a || M && !o) { | |
if (s = c || M ? {} : ii(e), | |
!u) | |
return c ? function(e, t) { | |
return mo(e, ni(e), t) | |
}(e, function(e, t) { | |
return e && mo(t, bu(t), e) | |
}(s, e)) : function(e, t) { | |
return mo(e, ti(e), t) | |
}(e, zn(s, e)) | |
} else { | |
if (!Fe[U]) | |
return o ? e : {}; | |
s = function(e, t, n) { | |
var r = e.constructor; | |
switch (t) { | |
case w: | |
return ho(e); | |
case l: | |
case f: | |
return new r(+e); | |
case A: | |
return function(e, t) { | |
var n = t ? ho(e.buffer) : e.buffer; | |
return new e.constructor(n,e.byteOffset,e.byteLength) | |
}(e, n); | |
case C: | |
case L: | |
case R: | |
case S: | |
case T: | |
case x: | |
case "[object Uint8ClampedArray]": | |
case I: | |
case O: | |
return po(e, n); | |
case v: | |
return new r; | |
case _: | |
case y: | |
return new r(e); | |
case j: | |
return function(e) { | |
var t = new e.constructor(e.source,re.exec(e)); | |
return t.lastIndex = e.lastIndex, | |
t | |
}(e); | |
case m: | |
return new r; | |
case b: | |
return o = e, | |
Ln ? ve(Ln.call(o)) : {} | |
} | |
var o | |
}(e, U, u) | |
} | |
} | |
i || (i = new Pn); | |
var Q = i.get(e); | |
if (Q) | |
return Q; | |
i.set(e, s), | |
Hs(e) ? e.forEach((function(r) { | |
s.add(Vn(r, t, n, r, e, i)) | |
} | |
)) : Ws(e) && e.forEach((function(r, o) { | |
s.set(o, Vn(r, t, n, o, e, i)) | |
} | |
)); | |
var k = E ? void 0 : (d ? c ? qo : zo : c ? bu : yu)(e); | |
return ut(k || e, (function(r, o) { | |
k && (r = e[o = r]), | |
Yn(s, o, Vn(r, t, n, o, e, i)) | |
} | |
)), | |
s | |
} | |
function Xn(e, t, n) { | |
var r = n.length; | |
if (null == e) | |
return !r; | |
for (e = ve(e); r--; ) { | |
var o = n[r] | |
, i = t[o] | |
, s = e[o]; | |
if (void 0 === s && !(o in e) || !i(s)) | |
return !1 | |
} | |
return !0 | |
} | |
function Jn(e, t, n) { | |
if ("function" != typeof e) | |
throw new je(i); | |
return yi((function() { | |
e.apply(void 0, n) | |
} | |
), t) | |
} | |
function $n(e, t, n, r) { | |
var o = -1 | |
, i = ft | |
, s = !0 | |
, u = e.length | |
, a = [] | |
, c = t.length; | |
if (!u) | |
return a; | |
n && (t = ht(t, xt(n))), | |
r ? (i = dt, | |
s = !1) : t.length >= 200 && (i = Ot, | |
s = !1, | |
t = new kn(t)); | |
e: for (; ++o < u; ) { | |
var l = e[o] | |
, f = null == n ? l : n(l); | |
if (l = r || 0 !== l ? l : 0, | |
s && f == f) { | |
for (var d = c; d--; ) | |
if (t[d] === f) | |
continue e; | |
a.push(l) | |
} else | |
i(t, f, r) || a.push(l) | |
} | |
return a | |
} | |
Sn.templateSettings = { | |
escape: B, | |
evaluate: F, | |
interpolate: Z, | |
variable: "", | |
imports: { | |
_: Sn | |
} | |
}, | |
Sn.prototype = xn.prototype, | |
Sn.prototype.constructor = Sn, | |
In.prototype = Tn(xn.prototype), | |
In.prototype.constructor = In, | |
On.prototype = Tn(xn.prototype), | |
On.prototype.constructor = On, | |
Un.prototype.clear = function() { | |
this.__data__ = gn ? gn(null) : {}, | |
this.size = 0 | |
} | |
, | |
Un.prototype.delete = function(e) { | |
var t = this.has(e) && delete this.__data__[e]; | |
return this.size -= t ? 1 : 0, | |
t | |
} | |
, | |
Un.prototype.get = function(e) { | |
var t = this.__data__; | |
if (gn) { | |
var n = t[e]; | |
return "__lodash_hash_undefined__" === n ? void 0 : n | |
} | |
return Ae.call(t, e) ? t[e] : void 0 | |
} | |
, | |
Un.prototype.has = function(e) { | |
var t = this.__data__; | |
return gn ? void 0 !== t[e] : Ae.call(t, e) | |
} | |
, | |
Un.prototype.set = function(e, t) { | |
var n = this.__data__; | |
return this.size += this.has(e) ? 0 : 1, | |
n[e] = gn && void 0 === t ? "__lodash_hash_undefined__" : t, | |
this | |
} | |
, | |
Mn.prototype.clear = function() { | |
this.__data__ = [], | |
this.size = 0 | |
} | |
, | |
Mn.prototype.delete = function(e) { | |
var t = this.__data__ | |
, n = Kn(t, e); | |
return !(n < 0) && (n == t.length - 1 ? t.pop() : He.call(t, n, 1), | |
--this.size, | |
!0) | |
} | |
, | |
Mn.prototype.get = function(e) { | |
var t = this.__data__ | |
, n = Kn(t, e); | |
return n < 0 ? void 0 : t[n][1] | |
} | |
, | |
Mn.prototype.has = function(e) { | |
return Kn(this.__data__, e) > -1 | |
} | |
, | |
Mn.prototype.set = function(e, t) { | |
var n = this.__data__ | |
, r = Kn(n, e); | |
return r < 0 ? (++this.size, | |
n.push([e, t])) : n[r][1] = t, | |
this | |
} | |
, | |
Qn.prototype.clear = function() { | |
this.size = 0, | |
this.__data__ = { | |
hash: new Un, | |
map: new (hn || Mn), | |
string: new Un | |
} | |
} | |
, | |
Qn.prototype.delete = function(e) { | |
var t = Jo(this, e).delete(e); | |
return this.size -= t ? 1 : 0, | |
t | |
} | |
, | |
Qn.prototype.get = function(e) { | |
return Jo(this, e).get(e) | |
} | |
, | |
Qn.prototype.has = function(e) { | |
return Jo(this, e).has(e) | |
} | |
, | |
Qn.prototype.set = function(e, t) { | |
var n = Jo(this, e) | |
, r = n.size; | |
return n.set(e, t), | |
this.size += n.size == r ? 0 : 1, | |
this | |
} | |
, | |
kn.prototype.add = kn.prototype.push = function(e) { | |
return this.__data__.set(e, "__lodash_hash_undefined__"), | |
this | |
} | |
, | |
kn.prototype.has = function(e) { | |
return this.__data__.has(e) | |
} | |
, | |
Pn.prototype.clear = function() { | |
this.__data__ = new Mn, | |
this.size = 0 | |
} | |
, | |
Pn.prototype.delete = function(e) { | |
var t = this.__data__ | |
, n = t.delete(e); | |
return this.size = t.size, | |
n | |
} | |
, | |
Pn.prototype.get = function(e) { | |
return this.__data__.get(e) | |
} | |
, | |
Pn.prototype.has = function(e) { | |
return this.__data__.has(e) | |
} | |
, | |
Pn.prototype.set = function(e, t) { | |
var n = this.__data__; | |
if (n instanceof Mn) { | |
var r = n.__data__; | |
if (!hn || r.length < 199) | |
return r.push([e, t]), | |
this.size = ++n.size, | |
this; | |
n = this.__data__ = new Qn(r) | |
} | |
return n.set(e, t), | |
this.size = n.size, | |
this | |
} | |
; | |
var er = Eo(ar) | |
, tr = Eo(cr, !0); | |
function nr(e, t) { | |
var n = !0; | |
return er(e, (function(e, r, o) { | |
return n = !!t(e, r, o) | |
} | |
)), | |
n | |
} | |
function rr(e, t, n) { | |
for (var r = -1, o = e.length; ++r < o; ) { | |
var i = e[r] | |
, s = t(i); | |
if (null != s && (void 0 === u ? s == s && !Xs(s) : n(s, u))) | |
var u = s | |
, a = i | |
} | |
return a | |
} | |
function or(e, t) { | |
var n = []; | |
return er(e, (function(e, r, o) { | |
t(e, r, o) && n.push(e) | |
} | |
)), | |
n | |
} | |
function ir(e, t, n, r, o) { | |
var i = -1 | |
, s = e.length; | |
for (n || (n = si), | |
o || (o = []); ++i < s; ) { | |
var u = e[i]; | |
t > 0 && n(u) ? t > 1 ? ir(u, t - 1, n, r, o) : pt(o, u) : r || (o[o.length] = u) | |
} | |
return o | |
} | |
var sr = wo() | |
, ur = wo(!0); | |
function ar(e, t) { | |
return e && sr(e, t, yu) | |
} | |
function cr(e, t) { | |
return e && ur(e, t, yu) | |
} | |
function lr(e, t) { | |
return lt(t, (function(t) { | |
return Bs(e[t]) | |
} | |
)) | |
} | |
function fr(e, t) { | |
for (var n = 0, r = (t = uo(t, e)).length; null != e && n < r; ) | |
e = e[Li(t[n++])]; | |
return n && n == r ? e : void 0 | |
} | |
function dr(e, t, n) { | |
var r = t(e); | |
return Us(e) ? r : pt(r, n(e)) | |
} | |
function hr(e) { | |
return null == e ? void 0 === e ? "[object Undefined]" : "[object Null]" : jt && jt in ve(e) ? function(e) { | |
var t = Ae.call(e, jt) | |
, n = e[jt]; | |
try { | |
e[jt] = void 0; | |
var r = !0 | |
} catch (e) {} | |
var o = Re.call(e); | |
r && (t ? e[jt] = n : delete e[jt]); | |
return o | |
}(e) : function(e) { | |
return Re.call(e) | |
}(e) | |
} | |
function pr(e, t) { | |
return e > t | |
} | |
function vr(e, t) { | |
return null != e && Ae.call(e, t) | |
} | |
function _r(e, t) { | |
return null != e && t in ve(e) | |
} | |
function gr(e, t, n) { | |
for (var o = n ? dt : ft, i = e[0].length, s = e.length, u = s, a = r(s), c = 1 / 0, l = []; u--; ) { | |
var f = e[u]; | |
u && t && (f = ht(f, xt(t))), | |
c = un(f.length, c), | |
a[u] = !n && (t || i >= 120 && f.length >= 120) ? new kn(u && f) : void 0 | |
} | |
f = e[0]; | |
var d = -1 | |
, h = a[0]; | |
e: for (; ++d < i && l.length < c; ) { | |
var p = f[d] | |
, v = t ? t(p) : p; | |
if (p = n || 0 !== p ? p : 0, | |
!(h ? Ot(h, v) : o(l, v, n))) { | |
for (u = s; --u; ) { | |
var _ = a[u]; | |
if (!(_ ? Ot(_, v) : o(e[u], v, n))) | |
continue e | |
} | |
h && h.push(v), | |
l.push(p) | |
} | |
} | |
return l | |
} | |
function jr(e, t, n) { | |
var r = null == (e = _i(e, t = uo(t, e))) ? e : e[Li(Di(t))]; | |
return null == r ? void 0 : it(r, e, n) | |
} | |
function mr(e) { | |
return Ks(e) && hr(e) == a | |
} | |
function yr(e, t, n, r, o) { | |
return e === t || (null == e || null == t || !Ks(e) && !Ks(t) ? e != e && t != t : function(e, t, n, r, o, i) { | |
var s = Us(e) | |
, u = Us(t) | |
, h = s ? c : ri(e) | |
, p = u ? c : ri(t) | |
, E = (h = h == a ? g : h) == g | |
, C = (p = p == a ? g : p) == g | |
, L = h == p; | |
if (L && Ps(e)) { | |
if (!Ps(t)) | |
return !1; | |
s = !0, | |
E = !1 | |
} | |
if (L && !E) | |
return i || (i = new Pn), | |
s || Js(e) ? Ko(e, t, n, r, o, i) : function(e, t, n, r, o, i, s) { | |
switch (n) { | |
case A: | |
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) | |
return !1; | |
e = e.buffer, | |
t = t.buffer; | |
case w: | |
return !(e.byteLength != t.byteLength || !i(new ke(e), new ke(t))); | |
case l: | |
case f: | |
case _: | |
return Ts(+e, +t); | |
case d: | |
return e.name == t.name && e.message == t.message; | |
case j: | |
case y: | |
return e == t + ""; | |
case v: | |
var u = Bt; | |
case m: | |
var a = 1 & r; | |
if (u || (u = Yt), | |
e.size != t.size && !a) | |
return !1; | |
var c = s.get(e); | |
if (c) | |
return c == t; | |
r |= 2, | |
s.set(e, t); | |
var h = Ko(u(e), u(t), r, o, i, s); | |
return s.delete(e), | |
h; | |
case b: | |
if (Ln) | |
return Ln.call(e) == Ln.call(t) | |
} | |
return !1 | |
}(e, t, h, n, r, o, i); | |
if (!(1 & n)) { | |
var R = E && Ae.call(e, "__wrapped__") | |
, S = C && Ae.call(t, "__wrapped__"); | |
if (R || S) { | |
var T = R ? e.value() : e | |
, x = S ? t.value() : t; | |
return i || (i = new Pn), | |
o(T, x, n, r, i) | |
} | |
} | |
if (!L) | |
return !1; | |
return i || (i = new Pn), | |
function(e, t, n, r, o, i) { | |
var s = 1 & n | |
, u = zo(e) | |
, a = u.length | |
, c = zo(t).length; | |
if (a != c && !s) | |
return !1; | |
var l = a; | |
for (; l--; ) { | |
var f = u[l]; | |
if (!(s ? f in t : Ae.call(t, f))) | |
return !1 | |
} | |
var d = i.get(e) | |
, h = i.get(t); | |
if (d && h) | |
return d == t && h == e; | |
var p = !0; | |
i.set(e, t), | |
i.set(t, e); | |
var v = s; | |
for (; ++l < a; ) { | |
f = u[l]; | |
var _ = e[f] | |
, g = t[f]; | |
if (r) | |
var j = s ? r(g, _, f, t, e, i) : r(_, g, f, e, t, i); | |
if (!(void 0 === j ? _ === g || o(_, g, n, r, i) : j)) { | |
p = !1; | |
break | |
} | |
v || (v = "constructor" == f) | |
} | |
if (p && !v) { | |
var m = e.constructor | |
, y = t.constructor; | |
m == y || !("constructor"in e) || !("constructor"in t) || "function" == typeof m && m instanceof m && "function" == typeof y && y instanceof y || (p = !1) | |
} | |
return i.delete(e), | |
i.delete(t), | |
p | |
}(e, t, n, r, o, i) | |
}(e, t, n, r, yr, o)) | |
} | |
function br(e, t, n, r) { | |
var o = n.length | |
, i = o | |
, s = !r; | |
if (null == e) | |
return !i; | |
for (e = ve(e); o--; ) { | |
var u = n[o]; | |
if (s && u[2] ? u[1] !== e[u[0]] : !(u[0]in e)) | |
return !1 | |
} | |
for (; ++o < i; ) { | |
var a = (u = n[o])[0] | |
, c = e[a] | |
, l = u[1]; | |
if (s && u[2]) { | |
if (void 0 === c && !(a in e)) | |
return !1 | |
} else { | |
var f = new Pn; | |
if (r) | |
var d = r(c, l, a, e, t, f); | |
if (!(void 0 === d ? yr(l, c, 3, r, f) : d)) | |
return !1 | |
} | |
} | |
return !0 | |
} | |
function Er(e) { | |
return !(!Ys(e) || (t = e, | |
Le && Le in t)) && (Bs(e) ? xe : se).test(Ri(e)); | |
var t | |
} | |
function wr(e) { | |
return "function" == typeof e ? e : null == e ? zu : "object" == typeof e ? Us(e) ? Tr(e[0], e[1]) : Sr(e) : ta(e) | |
} | |
function Ar(e) { | |
if (!di(e)) | |
return on(e); | |
var t = []; | |
for (var n in ve(e)) | |
Ae.call(e, n) && "constructor" != n && t.push(n); | |
return t | |
} | |
function Cr(e) { | |
if (!Ys(e)) | |
return function(e) { | |
var t = []; | |
if (null != e) | |
for (var n in ve(e)) | |
t.push(n); | |
return t | |
}(e); | |
var t = di(e) | |
, n = []; | |
for (var r in e) | |
("constructor" != r || !t && Ae.call(e, r)) && n.push(r); | |
return n | |
} | |
function Lr(e, t) { | |
return e < t | |
} | |
function Rr(e, t) { | |
var n = -1 | |
, o = Qs(e) ? r(e.length) : []; | |
return er(e, (function(e, r, i) { | |
o[++n] = t(e, r, i) | |
} | |
)), | |
o | |
} | |
function Sr(e) { | |
var t = $o(e); | |
return 1 == t.length && t[0][2] ? pi(t[0][0], t[0][1]) : function(n) { | |
return n === e || br(n, e, t) | |
} | |
} | |
function Tr(e, t) { | |
return ci(e) && hi(t) ? pi(Li(e), t) : function(n) { | |
var r = vu(n, e); | |
return void 0 === r && r === t ? _u(n, e) : yr(t, r, 3) | |
} | |
} | |
function xr(e, t, n, r, o) { | |
e !== t && sr(t, (function(i, s) { | |
if (o || (o = new Pn), | |
Ys(i)) | |
!function(e, t, n, r, o, i, s) { | |
var u = ji(e, n) | |
, a = ji(t, n) | |
, c = s.get(a); | |
if (c) | |
return void Zn(e, n, c); | |
var l = i ? i(u, a, n + "", e, t, s) : void 0 | |
, f = void 0 === l; | |
if (f) { | |
var d = Us(a) | |
, h = !d && Ps(a) | |
, p = !d && !h && Js(a); | |
l = a, | |
d || h || p ? Us(u) ? l = u : ks(u) ? l = jo(u) : h ? (f = !1, | |
l = fo(a, !0)) : p ? (f = !1, | |
l = po(a, !0)) : l = [] : qs(a) || Os(a) ? (l = u, | |
Os(u) ? l = su(u) : Ys(u) && !Bs(u) || (l = ii(a))) : f = !1 | |
} | |
f && (s.set(a, l), | |
o(l, a, r, i, s), | |
s.delete(a)); | |
Zn(e, n, l) | |
}(e, t, s, n, xr, r, o); | |
else { | |
var u = r ? r(ji(e, s), i, s + "", e, t, o) : void 0; | |
void 0 === u && (u = i), | |
Zn(e, s, u) | |
} | |
} | |
), bu) | |
} | |
function Ir(e, t) { | |
var n = e.length; | |
if (n) | |
return ui(t += t < 0 ? n : 0, n) ? e[t] : void 0 | |
} | |
function Or(e, t, n) { | |
t = t.length ? ht(t, (function(e) { | |
return Us(e) ? function(t) { | |
return fr(t, 1 === e.length ? e[0] : e) | |
} | |
: e | |
} | |
)) : [zu]; | |
var r = -1; | |
return t = ht(t, xt(Xo())), | |
function(e, t) { | |
var n = e.length; | |
for (e.sort(t); n--; ) | |
e[n] = e[n].value; | |
return e | |
}(Rr(e, (function(e, n, o) { | |
return { | |
criteria: ht(t, (function(t) { | |
return t(e) | |
} | |
)), | |
index: ++r, | |
value: e | |
} | |
} | |
)), (function(e, t) { | |
return function(e, t, n) { | |
var r = -1 | |
, o = e.criteria | |
, i = t.criteria | |
, s = o.length | |
, u = n.length; | |
for (; ++r < s; ) { | |
var a = vo(o[r], i[r]); | |
if (a) { | |
if (r >= u) | |
return a; | |
var c = n[r]; | |
return a * ("desc" == c ? -1 : 1) | |
} | |
} | |
return e.index - t.index | |
}(e, t, n) | |
} | |
)) | |
} | |
function Ur(e, t, n) { | |
for (var r = -1, o = t.length, i = {}; ++r < o; ) { | |
var s = t[r] | |
, u = fr(e, s); | |
n(u, s) && Fr(i, uo(s, e), u) | |
} | |
return i | |
} | |
function Mr(e, t, n, r) { | |
var o = r ? Et : bt | |
, i = -1 | |
, s = t.length | |
, u = e; | |
for (e === t && (t = jo(t)), | |
n && (u = ht(e, xt(n))); ++i < s; ) | |
for (var a = 0, c = t[i], l = n ? n(c) : c; (a = o(u, l, a, r)) > -1; ) | |
u !== e && He.call(u, a, 1), | |
He.call(e, a, 1); | |
return e | |
} | |
function Qr(e, t) { | |
for (var n = e ? t.length : 0, r = n - 1; n--; ) { | |
var o = t[n]; | |
if (n == r || o !== i) { | |
var i = o; | |
ui(o) ? He.call(e, o, 1) : $r(e, o) | |
} | |
} | |
return e | |
} | |
function kr(e, t) { | |
return e + $t(ln() * (t - e + 1)) | |
} | |
function Pr(e, t) { | |
var n = ""; | |
if (!e || t < 1 || t > 9007199254740991) | |
return n; | |
do { | |
t % 2 && (n += e), | |
(t = $t(t / 2)) && (e += e) | |
} while (t);return n | |
} | |
function Nr(e, t) { | |
return bi(vi(e, t, zu), e + "") | |
} | |
function Dr(e) { | |
return Dn(Tu(e)) | |
} | |
function Br(e, t) { | |
var n = Tu(e); | |
return Ai(n, Hn(t, 0, n.length)) | |
} | |
function Fr(e, t, n, r) { | |
if (!Ys(e)) | |
return e; | |
for (var o = -1, i = (t = uo(t, e)).length, s = i - 1, u = e; null != u && ++o < i; ) { | |
var a = Li(t[o]) | |
, c = n; | |
if ("__proto__" === a || "constructor" === a || "prototype" === a) | |
return e; | |
if (o != s) { | |
var l = u[a]; | |
void 0 === (c = r ? r(l, a, u) : void 0) && (c = Ys(l) ? l : ui(t[o + 1]) ? [] : {}) | |
} | |
Yn(u, a, c), | |
u = u[a] | |
} | |
return e | |
} | |
var Zr = jn ? function(e, t) { | |
return jn.set(e, t), | |
e | |
} | |
: zu | |
, Yr = Lt ? function(e, t) { | |
return Lt(e, "toString", { | |
configurable: !0, | |
enumerable: !1, | |
value: Yu(t), | |
writable: !0 | |
}) | |
} | |
: zu; | |
function Kr(e) { | |
return Ai(Tu(e)) | |
} | |
function Wr(e, t, n) { | |
var o = -1 | |
, i = e.length; | |
t < 0 && (t = -t > i ? 0 : i + t), | |
(n = n > i ? i : n) < 0 && (n += i), | |
i = t > n ? 0 : n - t >>> 0, | |
t >>>= 0; | |
for (var s = r(i); ++o < i; ) | |
s[o] = e[o + t]; | |
return s | |
} | |
function zr(e, t) { | |
var n; | |
return er(e, (function(e, r, o) { | |
return !(n = t(e, r, o)) | |
} | |
)), | |
!!n | |
} | |
function qr(e, t, n) { | |
var r = 0 | |
, o = null == e ? r : e.length; | |
if ("number" == typeof t && t == t && o <= 2147483647) { | |
for (; r < o; ) { | |
var i = r + o >>> 1 | |
, s = e[i]; | |
null !== s && !Xs(s) && (n ? s <= t : s < t) ? r = i + 1 : o = i | |
} | |
return o | |
} | |
return Gr(e, t, zu, n) | |
} | |
function Gr(e, t, n, r) { | |
var o = 0 | |
, i = null == e ? 0 : e.length; | |
if (0 === i) | |
return 0; | |
for (var s = (t = n(t)) != t, u = null === t, a = Xs(t), c = void 0 === t; o < i; ) { | |
var l = $t((o + i) / 2) | |
, f = n(e[l]) | |
, d = void 0 !== f | |
, h = null === f | |
, p = f == f | |
, v = Xs(f); | |
if (s) | |
var _ = r || p; | |
else | |
_ = c ? p && (r || d) : u ? p && d && (r || !h) : a ? p && d && !h && (r || !v) : !h && !v && (r ? f <= t : f < t); | |
_ ? o = l + 1 : i = l | |
} | |
return un(i, 4294967294) | |
} | |
function Hr(e, t) { | |
for (var n = -1, r = e.length, o = 0, i = []; ++n < r; ) { | |
var s = e[n] | |
, u = t ? t(s) : s; | |
if (!n || !Ts(u, a)) { | |
var a = u; | |
i[o++] = 0 === s ? 0 : s | |
} | |
} | |
return i | |
} | |
function Vr(e) { | |
return "number" == typeof e ? e : Xs(e) ? NaN : +e | |
} | |
function Xr(e) { | |
if ("string" == typeof e) | |
return e; | |
if (Us(e)) | |
return ht(e, Xr) + ""; | |
if (Xs(e)) | |
return Rn ? Rn.call(e) : ""; | |
var t = e + ""; | |
return "0" == t && 1 / e == -1 / 0 ? "-0" : t | |
} | |
function Jr(e, t, n) { | |
var r = -1 | |
, o = ft | |
, i = e.length | |
, s = !0 | |
, u = [] | |
, a = u; | |
if (n) | |
s = !1, | |
o = dt; | |
else if (i >= 200) { | |
var c = t ? null : No(e); | |
if (c) | |
return Yt(c); | |
s = !1, | |
o = Ot, | |
a = new kn | |
} else | |
a = t ? [] : u; | |
e: for (; ++r < i; ) { | |
var l = e[r] | |
, f = t ? t(l) : l; | |
if (l = n || 0 !== l ? l : 0, | |
s && f == f) { | |
for (var d = a.length; d--; ) | |
if (a[d] === f) | |
continue e; | |
t && a.push(f), | |
u.push(l) | |
} else | |
o(a, f, n) || (a !== u && a.push(f), | |
u.push(l)) | |
} | |
return u | |
} | |
function $r(e, t) { | |
return null == (e = _i(e, t = uo(t, e))) || delete e[Li(Di(t))] | |
} | |
function eo(e, t, n, r) { | |
return Fr(e, t, n(fr(e, t)), r) | |
} | |
function to(e, t, n, r) { | |
for (var o = e.length, i = r ? o : -1; (r ? i-- : ++i < o) && t(e[i], i, e); ) | |
; | |
return n ? Wr(e, r ? 0 : i, r ? i + 1 : o) : Wr(e, r ? i + 1 : 0, r ? o : i) | |
} | |
function no(e, t) { | |
var n = e; | |
return n instanceof On && (n = n.value()), | |
vt(t, (function(e, t) { | |
return t.func.apply(t.thisArg, pt([e], t.args)) | |
} | |
), n) | |
} | |
function ro(e, t, n) { | |
var o = e.length; | |
if (o < 2) | |
return o ? Jr(e[0]) : []; | |
for (var i = -1, s = r(o); ++i < o; ) | |
for (var u = e[i], a = -1; ++a < o; ) | |
a != i && (s[i] = $n(s[i] || u, e[a], t, n)); | |
return Jr(ir(s, 1), t, n) | |
} | |
function oo(e, t, n) { | |
for (var r = -1, o = e.length, i = t.length, s = {}; ++r < o; ) { | |
var u = r < i ? t[r] : void 0; | |
n(s, e[r], u) | |
} | |
return s | |
} | |
function io(e) { | |
return ks(e) ? e : [] | |
} | |
function so(e) { | |
return "function" == typeof e ? e : zu | |
} | |
function uo(e, t) { | |
return Us(e) ? e : ci(e, t) ? [e] : Ci(uu(e)) | |
} | |
var ao = Nr; | |
function co(e, t, n) { | |
var r = e.length; | |
return n = void 0 === n ? r : n, | |
!t && n >= r ? e : Wr(e, t, n) | |
} | |
var lo = Ht || function(e) { | |
return qe.clearTimeout(e) | |
} | |
; | |
function fo(e, t) { | |
if (t) | |
return e.slice(); | |
var n = e.length | |
, r = Ze ? Ze(n) : new e.constructor(n); | |
return e.copy(r), | |
r | |
} | |
function ho(e) { | |
var t = new e.constructor(e.byteLength); | |
return new ke(t).set(new ke(e)), | |
t | |
} | |
function po(e, t) { | |
var n = t ? ho(e.buffer) : e.buffer; | |
return new e.constructor(n,e.byteOffset,e.length) | |
} | |
function vo(e, t) { | |
if (e !== t) { | |
var n = void 0 !== e | |
, r = null === e | |
, o = e == e | |
, i = Xs(e) | |
, s = void 0 !== t | |
, u = null === t | |
, a = t == t | |
, c = Xs(t); | |
if (!u && !c && !i && e > t || i && s && a && !u && !c || r && s && a || !n && a || !o) | |
return 1; | |
if (!r && !i && !c && e < t || c && n && o && !r && !i || u && n && o || !s && o || !a) | |
return -1 | |
} | |
return 0 | |
} | |
function _o(e, t, n, o) { | |
for (var i = -1, s = e.length, u = n.length, a = -1, c = t.length, l = sn(s - u, 0), f = r(c + l), d = !o; ++a < c; ) | |
f[a] = t[a]; | |
for (; ++i < u; ) | |
(d || i < s) && (f[n[i]] = e[i]); | |
for (; l--; ) | |
f[a++] = e[i++]; | |
return f | |
} | |
function go(e, t, n, o) { | |
for (var i = -1, s = e.length, u = -1, a = n.length, c = -1, l = t.length, f = sn(s - a, 0), d = r(f + l), h = !o; ++i < f; ) | |
d[i] = e[i]; | |
for (var p = i; ++c < l; ) | |
d[p + c] = t[c]; | |
for (; ++u < a; ) | |
(h || i < s) && (d[p + n[u]] = e[i++]); | |
return d | |
} | |
function jo(e, t) { | |
var n = -1 | |
, o = e.length; | |
for (t || (t = r(o)); ++n < o; ) | |
t[n] = e[n]; | |
return t | |
} | |
function mo(e, t, n, r) { | |
var o = !n; | |
n || (n = {}); | |
for (var i = -1, s = t.length; ++i < s; ) { | |
var u = t[i] | |
, a = r ? r(n[u], e[u], u, n, e) : void 0; | |
void 0 === a && (a = e[u]), | |
o ? qn(n, u, a) : Yn(n, u, a) | |
} | |
return n | |
} | |
function yo(e, t) { | |
return function(n, r) { | |
var o = Us(n) ? st : Wn | |
, i = t ? t() : {}; | |
return o(n, e, Xo(r, 2), i) | |
} | |
} | |
function bo(e) { | |
return Nr((function(t, n) { | |
var r = -1 | |
, o = n.length | |
, i = o > 1 ? n[o - 1] : void 0 | |
, s = o > 2 ? n[2] : void 0; | |
for (i = e.length > 3 && "function" == typeof i ? (o--, | |
i) : void 0, | |
s && ai(n[0], n[1], s) && (i = o < 3 ? void 0 : i, | |
o = 1), | |
t = ve(t); ++r < o; ) { | |
var u = n[r]; | |
u && e(t, u, r, i) | |
} | |
return t | |
} | |
)) | |
} | |
function Eo(e, t) { | |
return function(n, r) { | |
if (null == n) | |
return n; | |
if (!Qs(n)) | |
return e(n, r); | |
for (var o = n.length, i = t ? o : -1, s = ve(n); (t ? i-- : ++i < o) && !1 !== r(s[i], i, s); ) | |
; | |
return n | |
} | |
} | |
function wo(e) { | |
return function(t, n, r) { | |
for (var o = -1, i = ve(t), s = r(t), u = s.length; u--; ) { | |
var a = s[e ? u : ++o]; | |
if (!1 === n(i[a], a, i)) | |
break | |
} | |
return t | |
} | |
} | |
function Ao(e) { | |
return function(t) { | |
var n = Dt(t = uu(t)) ? zt(t) : void 0 | |
, r = n ? n[0] : t.charAt(0) | |
, o = n ? co(n, 1).join("") : t.slice(1); | |
return r[e]() + o | |
} | |
} | |
function Co(e) { | |
return function(t) { | |
return vt(Bu(Ou(t).replace(Oe, "")), e, "") | |
} | |
} | |
function Lo(e) { | |
return function() { | |
var t = arguments; | |
switch (t.length) { | |
case 0: | |
return new e; | |
case 1: | |
return new e(t[0]); | |
case 2: | |
return new e(t[0],t[1]); | |
case 3: | |
return new e(t[0],t[1],t[2]); | |
case 4: | |
return new e(t[0],t[1],t[2],t[3]); | |
case 5: | |
return new e(t[0],t[1],t[2],t[3],t[4]); | |
case 6: | |
return new e(t[0],t[1],t[2],t[3],t[4],t[5]); | |
case 7: | |
return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]) | |
} | |
var n = Tn(e.prototype) | |
, r = e.apply(n, t); | |
return Ys(r) ? r : n | |
} | |
} | |
function Ro(e) { | |
return function(t, n, r) { | |
var o = ve(t); | |
if (!Qs(t)) { | |
var i = Xo(n, 3); | |
t = yu(t), | |
n = function(e) { | |
return i(o[e], e, o) | |
} | |
} | |
var s = e(t, n, r); | |
return s > -1 ? o[i ? t[s] : s] : void 0 | |
} | |
} | |
function So(e) { | |
return Wo((function(t) { | |
var n = t.length | |
, r = n | |
, o = In.prototype.thru; | |
for (e && t.reverse(); r--; ) { | |
var s = t[r]; | |
if ("function" != typeof s) | |
throw new je(i); | |
if (o && !u && "wrapper" == Ho(s)) | |
var u = new In([],!0) | |
} | |
for (r = u ? r : n; ++r < n; ) { | |
var a = Ho(s = t[r]) | |
, c = "wrapper" == a ? Go(s) : void 0; | |
u = c && li(c[0]) && 424 == c[1] && !c[4].length && 1 == c[9] ? u[Ho(c[0])].apply(u, c[3]) : 1 == s.length && li(s) ? u[a]() : u.thru(s) | |
} | |
return function() { | |
var e = arguments | |
, r = e[0]; | |
if (u && 1 == e.length && Us(r)) | |
return u.plant(r).value(); | |
for (var o = 0, i = n ? t[o].apply(this, e) : r; ++o < n; ) | |
i = t[o].call(this, i); | |
return i | |
} | |
} | |
)) | |
} | |
function To(e, t, n, o, i, s, u, a, c, l) { | |
var f = 128 & t | |
, d = 1 & t | |
, h = 2 & t | |
, p = 24 & t | |
, v = 512 & t | |
, _ = h ? void 0 : Lo(e); | |
return function g() { | |
for (var j = arguments.length, m = r(j), y = j; y--; ) | |
m[y] = arguments[y]; | |
if (p) | |
var b = Vo(g) | |
, E = Qt(m, b); | |
if (o && (m = _o(m, o, i, p)), | |
s && (m = go(m, s, u, p)), | |
j -= E, | |
p && j < l) { | |
var w = Zt(m, b); | |
return ko(e, t, To, g.placeholder, n, m, w, a, c, l - j) | |
} | |
var A = d ? n : this | |
, C = h ? A[e] : e; | |
return j = m.length, | |
a ? m = gi(m, a) : v && j > 1 && m.reverse(), | |
f && c < j && (m.length = c), | |
this && this !== qe && this instanceof g && (C = _ || Lo(C)), | |
C.apply(A, m) | |
} | |
} | |
function xo(e, t) { | |
return function(n, r) { | |
return function(e, t, n, r) { | |
return ar(e, (function(e, o, i) { | |
t(r, n(e), o, i) | |
} | |
)), | |
r | |
}(n, e, t(r), {}) | |
} | |
} | |
function Io(e, t) { | |
return function(n, r) { | |
var o; | |
if (void 0 === n && void 0 === r) | |
return t; | |
if (void 0 !== n && (o = n), | |
void 0 !== r) { | |
if (void 0 === o) | |
return r; | |
"string" == typeof n || "string" == typeof r ? (n = Xr(n), | |
r = Xr(r)) : (n = Vr(n), | |
r = Vr(r)), | |
o = e(n, r) | |
} | |
return o | |
} | |
} | |
function Oo(e) { | |
return Wo((function(t) { | |
return t = ht(t, xt(Xo())), | |
Nr((function(n) { | |
var r = this; | |
return e(t, (function(e) { | |
return it(e, r, n) | |
} | |
)) | |
} | |
)) | |
} | |
)) | |
} | |
function Uo(e, t) { | |
var n = (t = void 0 === t ? " " : Xr(t)).length; | |
if (n < 2) | |
return n ? Pr(t, e) : t; | |
var r = Pr(t, Jt(e / Wt(t))); | |
return Dt(t) ? co(zt(r), 0, e).join("") : r.slice(0, e) | |
} | |
function Mo(e) { | |
return function(t, n, o) { | |
return o && "number" != typeof o && ai(t, n, o) && (n = o = void 0), | |
t = nu(t), | |
void 0 === n ? (n = t, | |
t = 0) : n = nu(n), | |
function(e, t, n, o) { | |
for (var i = -1, s = sn(Jt((t - e) / (n || 1)), 0), u = r(s); s--; ) | |
u[o ? s : ++i] = e, | |
e += n; | |
return u | |
}(t, n, o = void 0 === o ? t < n ? 1 : -1 : nu(o), e) | |
} | |
} | |
function Qo(e) { | |
return function(t, n) { | |
return "string" == typeof t && "string" == typeof n || (t = iu(t), | |
n = iu(n)), | |
e(t, n) | |
} | |
} | |
function ko(e, t, n, r, o, i, s, u, a, c) { | |
var l = 8 & t; | |
t |= l ? 32 : 64, | |
4 & (t &= ~(l ? 64 : 32)) || (t &= -4); | |
var f = [e, t, o, l ? i : void 0, l ? s : void 0, l ? void 0 : i, l ? void 0 : s, u, a, c] | |
, d = n.apply(void 0, f); | |
return li(e) && mi(d, f), | |
d.placeholder = r, | |
Ei(d, e, t) | |
} | |
function Po(e) { | |
var t = pe[e]; | |
return function(e, n) { | |
if (e = iu(e), | |
(n = null == n ? 0 : un(ru(n), 292)) && nn(e)) { | |
var r = (uu(e) + "e").split("e"); | |
return +((r = (uu(t(r[0] + "e" + (+r[1] + n))) + "e").split("e"))[0] + "e" + (+r[1] - n)) | |
} | |
return t(e) | |
} | |
} | |
var No = vn && 1 / Yt(new vn([, -0]))[1] == 1 / 0 ? function(e) { | |
return new vn(e) | |
} | |
: Xu; | |
function Do(e) { | |
return function(t) { | |
var n = ri(t); | |
return n == v ? Bt(t) : n == m ? Kt(t) : function(e, t) { | |
return ht(t, (function(t) { | |
return [t, e[t]] | |
} | |
)) | |
}(t, e(t)) | |
} | |
} | |
function Bo(e, t, n, o, u, a, c, l) { | |
var f = 2 & t; | |
if (!f && "function" != typeof e) | |
throw new je(i); | |
var d = o ? o.length : 0; | |
if (d || (t &= -97, | |
o = u = void 0), | |
c = void 0 === c ? c : sn(ru(c), 0), | |
l = void 0 === l ? l : ru(l), | |
d -= u ? u.length : 0, | |
64 & t) { | |
var h = o | |
, p = u; | |
o = u = void 0 | |
} | |
var v = f ? void 0 : Go(e) | |
, _ = [e, t, n, o, u, h, p, a, c, l]; | |
if (v && function(e, t) { | |
var n = e[1] | |
, r = t[1] | |
, o = n | r | |
, i = o < 131 | |
, u = 128 == r && 8 == n || 128 == r && 256 == n && e[7].length <= t[8] || 384 == r && t[7].length <= t[8] && 8 == n; | |
if (!i && !u) | |
return e; | |
1 & r && (e[2] = t[2], | |
o |= 1 & n ? 0 : 4); | |
var a = t[3]; | |
if (a) { | |
var c = e[3]; | |
e[3] = c ? _o(c, a, t[4]) : a, | |
e[4] = c ? Zt(e[3], s) : t[4] | |
} | |
(a = t[5]) && (c = e[5], | |
e[5] = c ? go(c, a, t[6]) : a, | |
e[6] = c ? Zt(e[5], s) : t[6]); | |
(a = t[7]) && (e[7] = a); | |
128 & r && (e[8] = null == e[8] ? t[8] : un(e[8], t[8])); | |
null == e[9] && (e[9] = t[9]); | |
e[0] = t[0], | |
e[1] = o | |
}(_, v), | |
e = _[0], | |
t = _[1], | |
n = _[2], | |
o = _[3], | |
u = _[4], | |
!(l = _[9] = void 0 === _[9] ? f ? 0 : e.length : sn(_[9] - d, 0)) && 24 & t && (t &= -25), | |
t && 1 != t) | |
g = 8 == t || 16 == t ? function(e, t, n) { | |
var o = Lo(e); | |
return function i() { | |
for (var s = arguments.length, u = r(s), a = s, c = Vo(i); a--; ) | |
u[a] = arguments[a]; | |
var l = s < 3 && u[0] !== c && u[s - 1] !== c ? [] : Zt(u, c); | |
if ((s -= l.length) < n) | |
return ko(e, t, To, i.placeholder, void 0, u, l, void 0, void 0, n - s); | |
var f = this && this !== qe && this instanceof i ? o : e; | |
return it(f, this, u) | |
} | |
}(e, t, l) : 32 != t && 33 != t || u.length ? To.apply(void 0, _) : function(e, t, n, o) { | |
var i = 1 & t | |
, s = Lo(e); | |
return function t() { | |
for (var u = -1, a = arguments.length, c = -1, l = o.length, f = r(l + a), d = this && this !== qe && this instanceof t ? s : e; ++c < l; ) | |
f[c] = o[c]; | |
for (; a--; ) | |
f[c++] = arguments[++u]; | |
return it(d, i ? n : this, f) | |
} | |
}(e, t, n, o); | |
else | |
var g = function(e, t, n) { | |
var r = 1 & t | |
, o = Lo(e); | |
return function t() { | |
var i = this && this !== qe && this instanceof t ? o : e; | |
return i.apply(r ? n : this, arguments) | |
} | |
}(e, t, n); | |
return Ei((v ? Zr : mi)(g, _), e, t) | |
} | |
function Fo(e, t, n, r) { | |
return void 0 === e || Ts(e, be[n]) && !Ae.call(r, n) ? t : e | |
} | |
function Zo(e, t, n, r, o, i) { | |
return Ys(e) && Ys(t) && (i.set(t, e), | |
xr(e, t, void 0, Zo, i), | |
i.delete(t)), | |
e | |
} | |
function Yo(e) { | |
return qs(e) ? void 0 : e | |
} | |
function Ko(e, t, n, r, o, i) { | |
var s = 1 & n | |
, u = e.length | |
, a = t.length; | |
if (u != a && !(s && a > u)) | |
return !1; | |
var c = i.get(e) | |
, l = i.get(t); | |
if (c && l) | |
return c == t && l == e; | |
var f = -1 | |
, d = !0 | |
, h = 2 & n ? new kn : void 0; | |
for (i.set(e, t), | |
i.set(t, e); ++f < u; ) { | |
var p = e[f] | |
, v = t[f]; | |
if (r) | |
var _ = s ? r(v, p, f, t, e, i) : r(p, v, f, e, t, i); | |
if (void 0 !== _) { | |
if (_) | |
continue; | |
d = !1; | |
break | |
} | |
if (h) { | |
if (!gt(t, (function(e, t) { | |
if (!Ot(h, t) && (p === e || o(p, e, n, r, i))) | |
return h.push(t) | |
} | |
))) { | |
d = !1; | |
break | |
} | |
} else if (p !== v && !o(p, v, n, r, i)) { | |
d = !1; | |
break | |
} | |
} | |
return i.delete(e), | |
i.delete(t), | |
d | |
} | |
function Wo(e) { | |
return bi(vi(e, void 0, Mi), e + "") | |
} | |
function zo(e) { | |
return dr(e, yu, ti) | |
} | |
function qo(e) { | |
return dr(e, bu, ni) | |
} | |
var Go = jn ? function(e) { | |
return jn.get(e) | |
} | |
: Xu; | |
function Ho(e) { | |
for (var t = e.name + "", n = mn[t], r = Ae.call(mn, t) ? n.length : 0; r--; ) { | |
var o = n[r] | |
, i = o.func; | |
if (null == i || i == e) | |
return o.name | |
} | |
return t | |
} | |
function Vo(e) { | |
return (Ae.call(Sn, "placeholder") ? Sn : e).placeholder | |
} | |
function Xo() { | |
var e = Sn.iteratee || qu; | |
return e = e === qu ? wr : e, | |
arguments.length ? e(arguments[0], arguments[1]) : e | |
} | |
function Jo(e, t) { | |
var n, r, o = e.__data__; | |
return ("string" == (r = typeof (n = t)) || "number" == r || "symbol" == r || "boolean" == r ? "__proto__" !== n : null === n) ? o["string" == typeof t ? "string" : "hash"] : o.map | |
} | |
function $o(e) { | |
for (var t = yu(e), n = t.length; n--; ) { | |
var r = t[n] | |
, o = e[r]; | |
t[n] = [r, o, hi(o)] | |
} | |
return t | |
} | |
function ei(e, t) { | |
var n = function(e, t) { | |
return null == e ? void 0 : e[t] | |
}(e, t); | |
return Er(n) ? n : void 0 | |
} | |
var ti = en ? function(e) { | |
return null == e ? [] : (e = ve(e), | |
lt(en(e), (function(t) { | |
return Ge.call(e, t) | |
} | |
))) | |
} | |
: oa | |
, ni = en ? function(e) { | |
for (var t = []; e; ) | |
pt(t, ti(e)), | |
e = We(e); | |
return t | |
} | |
: oa | |
, ri = hr; | |
function oi(e, t, n) { | |
for (var r = -1, o = (t = uo(t, e)).length, i = !1; ++r < o; ) { | |
var s = Li(t[r]); | |
if (!(i = null != e && n(e, s))) | |
break; | |
e = e[s] | |
} | |
return i || ++r != o ? i : !!(o = null == e ? 0 : e.length) && Zs(o) && ui(s, o) && (Us(e) || Os(e)) | |
} | |
function ii(e) { | |
return "function" != typeof e.constructor || di(e) ? {} : Tn(We(e)) | |
} | |
function si(e) { | |
return Us(e) || Os(e) || !!(Xe && e && e[Xe]) | |
} | |
function ui(e, t) { | |
var n = typeof e; | |
return !!(t = null == t ? 9007199254740991 : t) && ("number" == n || "symbol" != n && ae.test(e)) && e > -1 && e % 1 == 0 && e < t | |
} | |
function ai(e, t, n) { | |
if (!Ys(n)) | |
return !1; | |
var r = typeof t; | |
return !!("number" == r ? Qs(n) && ui(t, n.length) : "string" == r && t in n) && Ts(n[t], e) | |
} | |
function ci(e, t) { | |
if (Us(e)) | |
return !1; | |
var n = typeof e; | |
return !("number" != n && "symbol" != n && "boolean" != n && null != e && !Xs(e)) || (K.test(e) || !Y.test(e) || null != t && e in ve(t)) | |
} | |
function li(e) { | |
var t = Ho(e) | |
, n = Sn[t]; | |
if ("function" != typeof n || !(t in On.prototype)) | |
return !1; | |
if (e === n) | |
return !0; | |
var r = Go(n); | |
return !!r && e === r[0] | |
} | |
(dn && ri(new dn(new ArrayBuffer(1))) != A || hn && ri(new hn) != v || pn && "[object Promise]" != ri(pn.resolve()) || vn && ri(new vn) != m || _n && ri(new _n) != E) && (ri = function(e) { | |
var t = hr(e) | |
, n = t == g ? e.constructor : void 0 | |
, r = n ? Ri(n) : ""; | |
if (r) | |
switch (r) { | |
case yn: | |
return A; | |
case bn: | |
return v; | |
case En: | |
return "[object Promise]"; | |
case wn: | |
return m; | |
case An: | |
return E | |
} | |
return t | |
} | |
); | |
var fi = Ee ? Bs : ia; | |
function di(e) { | |
var t = e && e.constructor; | |
return e === ("function" == typeof t && t.prototype || be) | |
} | |
function hi(e) { | |
return e == e && !Ys(e) | |
} | |
function pi(e, t) { | |
return function(n) { | |
return null != n && (n[e] === t && (void 0 !== t || e in ve(n))) | |
} | |
} | |
function vi(e, t, n) { | |
return t = sn(void 0 === t ? e.length - 1 : t, 0), | |
function() { | |
for (var o = arguments, i = -1, s = sn(o.length - t, 0), u = r(s); ++i < s; ) | |
u[i] = o[t + i]; | |
i = -1; | |
for (var a = r(t + 1); ++i < t; ) | |
a[i] = o[i]; | |
return a[t] = n(u), | |
it(e, this, a) | |
} | |
} | |
function _i(e, t) { | |
return t.length < 2 ? e : fr(e, Wr(t, 0, -1)) | |
} | |
function gi(e, t) { | |
for (var n = e.length, r = un(t.length, n), o = jo(e); r--; ) { | |
var i = t[r]; | |
e[r] = ui(i, n) ? o[i] : void 0 | |
} | |
return e | |
} | |
function ji(e, t) { | |
if (("constructor" !== t || "function" != typeof e[t]) && "__proto__" != t) | |
return e[t] | |
} | |
var mi = wi(Zr) | |
, yi = Xt || function(e, t) { | |
return qe.setTimeout(e, t) | |
} | |
, bi = wi(Yr); | |
function Ei(e, t, n) { | |
var r = t + ""; | |
return bi(e, function(e, t) { | |
var n = t.length; | |
if (!n) | |
return e; | |
var r = n - 1; | |
return t[r] = (n > 1 ? "& " : "") + t[r], | |
t = t.join(n > 2 ? ", " : " "), | |
e.replace(X, "{\n/* [wrapped with " + t + "] */\n") | |
}(r, function(e, t) { | |
return ut(u, (function(n) { | |
var r = "_." + n[0]; | |
t & n[1] && !ft(e, r) && e.push(r) | |
} | |
)), | |
e.sort() | |
}(function(e) { | |
var t = e.match(J); | |
return t ? t[1].split($) : [] | |
}(r), n))) | |
} | |
function wi(e) { | |
var t = 0 | |
, n = 0; | |
return function() { | |
var r = an() | |
, o = 16 - (r - n); | |
if (n = r, | |
o > 0) { | |
if (++t >= 800) | |
return arguments[0] | |
} else | |
t = 0; | |
return e.apply(void 0, arguments) | |
} | |
} | |
function Ai(e, t) { | |
var n = -1 | |
, r = e.length | |
, o = r - 1; | |
for (t = void 0 === t ? r : t; ++n < t; ) { | |
var i = kr(n, o) | |
, s = e[i]; | |
e[i] = e[n], | |
e[n] = s | |
} | |
return e.length = t, | |
e | |
} | |
var Ci = function(e) { | |
var t = ws(e, (function(e) { | |
return 500 === n.size && n.clear(), | |
e | |
} | |
)) | |
, n = t.cache; | |
return t | |
}((function(e) { | |
var t = []; | |
return 46 === e.charCodeAt(0) && t.push(""), | |
e.replace(W, (function(e, n, r, o) { | |
t.push(r ? o.replace(te, "$1") : n || e) | |
} | |
)), | |
t | |
} | |
)); | |
function Li(e) { | |
if ("string" == typeof e || Xs(e)) | |
return e; | |
var t = e + ""; | |
return "0" == t && 1 / e == -1 / 0 ? "-0" : t | |
} | |
function Ri(e) { | |
if (null != e) { | |
try { | |
return we.call(e) | |
} catch (e) {} | |
try { | |
return e + "" | |
} catch (e) {} | |
} | |
return "" | |
} | |
function Si(e) { | |
if (e instanceof On) | |
return e.clone(); | |
var t = new In(e.__wrapped__,e.__chain__); | |
return t.__actions__ = jo(e.__actions__), | |
t.__index__ = e.__index__, | |
t.__values__ = e.__values__, | |
t | |
} | |
var Ti = Nr((function(e, t) { | |
return ks(e) ? $n(e, ir(t, 1, ks, !0)) : [] | |
} | |
)) | |
, xi = Nr((function(e, t) { | |
var n = Di(t); | |
return ks(n) && (n = void 0), | |
ks(e) ? $n(e, ir(t, 1, ks, !0), Xo(n, 2)) : [] | |
} | |
)) | |
, Ii = Nr((function(e, t) { | |
var n = Di(t); | |
return ks(n) && (n = void 0), | |
ks(e) ? $n(e, ir(t, 1, ks, !0), void 0, n) : [] | |
} | |
)); | |
function Oi(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
if (!r) | |
return -1; | |
var o = null == n ? 0 : ru(n); | |
return o < 0 && (o = sn(r + o, 0)), | |
yt(e, Xo(t, 3), o) | |
} | |
function Ui(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
if (!r) | |
return -1; | |
var o = r - 1; | |
return void 0 !== n && (o = ru(n), | |
o = n < 0 ? sn(r + o, 0) : un(o, r - 1)), | |
yt(e, Xo(t, 3), o, !0) | |
} | |
function Mi(e) { | |
return (null == e ? 0 : e.length) ? ir(e, 1) : [] | |
} | |
function Qi(e) { | |
return e && e.length ? e[0] : void 0 | |
} | |
var ki = Nr((function(e) { | |
var t = ht(e, io); | |
return t.length && t[0] === e[0] ? gr(t) : [] | |
} | |
)) | |
, Pi = Nr((function(e) { | |
var t = Di(e) | |
, n = ht(e, io); | |
return t === Di(n) ? t = void 0 : n.pop(), | |
n.length && n[0] === e[0] ? gr(n, Xo(t, 2)) : [] | |
} | |
)) | |
, Ni = Nr((function(e) { | |
var t = Di(e) | |
, n = ht(e, io); | |
return (t = "function" == typeof t ? t : void 0) && n.pop(), | |
n.length && n[0] === e[0] ? gr(n, void 0, t) : [] | |
} | |
)); | |
function Di(e) { | |
var t = null == e ? 0 : e.length; | |
return t ? e[t - 1] : void 0 | |
} | |
var Bi = Nr(Fi); | |
function Fi(e, t) { | |
return e && e.length && t && t.length ? Mr(e, t) : e | |
} | |
var Zi = Wo((function(e, t) { | |
var n = null == e ? 0 : e.length | |
, r = Gn(e, t); | |
return Qr(e, ht(t, (function(e) { | |
return ui(e, n) ? +e : e | |
} | |
)).sort(vo)), | |
r | |
} | |
)); | |
function Yi(e) { | |
return null == e ? e : fn.call(e) | |
} | |
var Ki = Nr((function(e) { | |
return Jr(ir(e, 1, ks, !0)) | |
} | |
)) | |
, Wi = Nr((function(e) { | |
var t = Di(e); | |
return ks(t) && (t = void 0), | |
Jr(ir(e, 1, ks, !0), Xo(t, 2)) | |
} | |
)) | |
, zi = Nr((function(e) { | |
var t = Di(e); | |
return t = "function" == typeof t ? t : void 0, | |
Jr(ir(e, 1, ks, !0), void 0, t) | |
} | |
)); | |
function qi(e) { | |
if (!e || !e.length) | |
return []; | |
var t = 0; | |
return e = lt(e, (function(e) { | |
if (ks(e)) | |
return t = sn(e.length, t), | |
!0 | |
} | |
)), | |
Tt(t, (function(t) { | |
return ht(e, Ct(t)) | |
} | |
)) | |
} | |
function Gi(e, t) { | |
if (!e || !e.length) | |
return []; | |
var n = qi(e); | |
return null == t ? n : ht(n, (function(e) { | |
return it(t, void 0, e) | |
} | |
)) | |
} | |
var Hi = Nr((function(e, t) { | |
return ks(e) ? $n(e, t) : [] | |
} | |
)) | |
, Vi = Nr((function(e) { | |
return ro(lt(e, ks)) | |
} | |
)) | |
, Xi = Nr((function(e) { | |
var t = Di(e); | |
return ks(t) && (t = void 0), | |
ro(lt(e, ks), Xo(t, 2)) | |
} | |
)) | |
, Ji = Nr((function(e) { | |
var t = Di(e); | |
return t = "function" == typeof t ? t : void 0, | |
ro(lt(e, ks), void 0, t) | |
} | |
)) | |
, $i = Nr(qi); | |
var es = Nr((function(e) { | |
var t = e.length | |
, n = t > 1 ? e[t - 1] : void 0; | |
return n = "function" == typeof n ? (e.pop(), | |
n) : void 0, | |
Gi(e, n) | |
} | |
)); | |
function ts(e) { | |
var t = Sn(e); | |
return t.__chain__ = !0, | |
t | |
} | |
function ns(e, t) { | |
return t(e) | |
} | |
var rs = Wo((function(e) { | |
var t = e.length | |
, n = t ? e[0] : 0 | |
, r = this.__wrapped__ | |
, o = function(t) { | |
return Gn(t, e) | |
}; | |
return !(t > 1 || this.__actions__.length) && r instanceof On && ui(n) ? ((r = r.slice(n, +n + (t ? 1 : 0))).__actions__.push({ | |
func: ns, | |
args: [o], | |
thisArg: void 0 | |
}), | |
new In(r,this.__chain__).thru((function(e) { | |
return t && !e.length && e.push(void 0), | |
e | |
} | |
))) : this.thru(o) | |
} | |
)); | |
var os = yo((function(e, t, n) { | |
Ae.call(e, n) ? ++e[n] : qn(e, n, 1) | |
} | |
)); | |
var is = Ro(Oi) | |
, ss = Ro(Ui); | |
function us(e, t) { | |
return (Us(e) ? ut : er)(e, Xo(t, 3)) | |
} | |
function as(e, t) { | |
return (Us(e) ? at : tr)(e, Xo(t, 3)) | |
} | |
var cs = yo((function(e, t, n) { | |
Ae.call(e, n) ? e[n].push(t) : qn(e, n, [t]) | |
} | |
)); | |
var ls = Nr((function(e, t, n) { | |
var o = -1 | |
, i = "function" == typeof t | |
, s = Qs(e) ? r(e.length) : []; | |
return er(e, (function(e) { | |
s[++o] = i ? it(t, e, n) : jr(e, t, n) | |
} | |
)), | |
s | |
} | |
)) | |
, fs = yo((function(e, t, n) { | |
qn(e, n, t) | |
} | |
)); | |
function ds(e, t) { | |
return (Us(e) ? ht : Rr)(e, Xo(t, 3)) | |
} | |
var hs = yo((function(e, t, n) { | |
e[n ? 0 : 1].push(t) | |
} | |
), (function() { | |
return [[], []] | |
} | |
)); | |
var ps = Nr((function(e, t) { | |
if (null == e) | |
return []; | |
var n = t.length; | |
return n > 1 && ai(e, t[0], t[1]) ? t = [] : n > 2 && ai(t[0], t[1], t[2]) && (t = [t[0]]), | |
Or(e, ir(t, 1), []) | |
} | |
)) | |
, vs = Vt || function() { | |
return qe.Date.now() | |
} | |
; | |
function _s(e, t, n) { | |
return t = n ? void 0 : t, | |
Bo(e, 128, void 0, void 0, void 0, void 0, t = e && null == t ? e.length : t) | |
} | |
function gs(e, t) { | |
var n; | |
if ("function" != typeof t) | |
throw new je(i); | |
return e = ru(e), | |
function() { | |
return --e > 0 && (n = t.apply(this, arguments)), | |
e <= 1 && (t = void 0), | |
n | |
} | |
} | |
var js = Nr((function(e, t, n) { | |
var r = 1; | |
if (n.length) { | |
var o = Zt(n, Vo(js)); | |
r |= 32 | |
} | |
return Bo(e, r, t, n, o) | |
} | |
)) | |
, ms = Nr((function(e, t, n) { | |
var r = 3; | |
if (n.length) { | |
var o = Zt(n, Vo(ms)); | |
r |= 32 | |
} | |
return Bo(t, r, e, n, o) | |
} | |
)); | |
function ys(e, t, n) { | |
var r, o, s, u, a, c, l = 0, f = !1, d = !1, h = !0; | |
if ("function" != typeof e) | |
throw new je(i); | |
function p(t) { | |
var n = r | |
, i = o; | |
return r = o = void 0, | |
l = t, | |
u = e.apply(i, n) | |
} | |
function v(e) { | |
return l = e, | |
a = yi(g, t), | |
f ? p(e) : u | |
} | |
function _(e) { | |
var n = e - c; | |
return void 0 === c || n >= t || n < 0 || d && e - l >= s | |
} | |
function g() { | |
var e = vs(); | |
if (_(e)) | |
return j(e); | |
a = yi(g, function(e) { | |
var n = t - (e - c); | |
return d ? un(n, s - (e - l)) : n | |
}(e)) | |
} | |
function j(e) { | |
return a = void 0, | |
h && r ? p(e) : (r = o = void 0, | |
u) | |
} | |
function m() { | |
var e = vs() | |
, n = _(e); | |
if (r = arguments, | |
o = this, | |
c = e, | |
n) { | |
if (void 0 === a) | |
return v(c); | |
if (d) | |
return lo(a), | |
a = yi(g, t), | |
p(c) | |
} | |
return void 0 === a && (a = yi(g, t)), | |
u | |
} | |
return t = iu(t) || 0, | |
Ys(n) && (f = !!n.leading, | |
s = (d = "maxWait"in n) ? sn(iu(n.maxWait) || 0, t) : s, | |
h = "trailing"in n ? !!n.trailing : h), | |
m.cancel = function() { | |
void 0 !== a && lo(a), | |
l = 0, | |
r = c = o = a = void 0 | |
} | |
, | |
m.flush = function() { | |
return void 0 === a ? u : j(vs()) | |
} | |
, | |
m | |
} | |
var bs = Nr((function(e, t) { | |
return Jn(e, 1, t) | |
} | |
)) | |
, Es = Nr((function(e, t, n) { | |
return Jn(e, iu(t) || 0, n) | |
} | |
)); | |
function ws(e, t) { | |
if ("function" != typeof e || null != t && "function" != typeof t) | |
throw new je(i); | |
var n = function() { | |
var r = arguments | |
, o = t ? t.apply(this, r) : r[0] | |
, i = n.cache; | |
if (i.has(o)) | |
return i.get(o); | |
var s = e.apply(this, r); | |
return n.cache = i.set(o, s) || i, | |
s | |
}; | |
return n.cache = new (ws.Cache || Qn), | |
n | |
} | |
function As(e) { | |
if ("function" != typeof e) | |
throw new je(i); | |
return function() { | |
var t = arguments; | |
switch (t.length) { | |
case 0: | |
return !e.call(this); | |
case 1: | |
return !e.call(this, t[0]); | |
case 2: | |
return !e.call(this, t[0], t[1]); | |
case 3: | |
return !e.call(this, t[0], t[1], t[2]) | |
} | |
return !e.apply(this, t) | |
} | |
} | |
ws.Cache = Qn; | |
var Cs = ao((function(e, t) { | |
var n = (t = 1 == t.length && Us(t[0]) ? ht(t[0], xt(Xo())) : ht(ir(t, 1), xt(Xo()))).length; | |
return Nr((function(r) { | |
for (var o = -1, i = un(r.length, n); ++o < i; ) | |
r[o] = t[o].call(this, r[o]); | |
return it(e, this, r) | |
} | |
)) | |
} | |
)) | |
, Ls = Nr((function(e, t) { | |
return Bo(e, 32, void 0, t, Zt(t, Vo(Ls))) | |
} | |
)) | |
, Rs = Nr((function(e, t) { | |
return Bo(e, 64, void 0, t, Zt(t, Vo(Rs))) | |
} | |
)) | |
, Ss = Wo((function(e, t) { | |
return Bo(e, 256, void 0, void 0, void 0, t) | |
} | |
)); | |
function Ts(e, t) { | |
return e === t || e != e && t != t | |
} | |
var xs = Qo(pr) | |
, Is = Qo((function(e, t) { | |
return e >= t | |
} | |
)) | |
, Os = mr(function() { | |
return arguments | |
}()) ? mr : function(e) { | |
return Ks(e) && Ae.call(e, "callee") && !Ge.call(e, "callee") | |
} | |
, Us = r.isArray | |
, Ms = $e ? xt($e) : function(e) { | |
return Ks(e) && hr(e) == w | |
} | |
; | |
function Qs(e) { | |
return null != e && Zs(e.length) && !Bs(e) | |
} | |
function ks(e) { | |
return Ks(e) && Qs(e) | |
} | |
var Ps = tn || ia | |
, Ns = et ? xt(et) : function(e) { | |
return Ks(e) && hr(e) == f | |
} | |
; | |
function Ds(e) { | |
if (!Ks(e)) | |
return !1; | |
var t = hr(e); | |
return t == d || "[object DOMException]" == t || "string" == typeof e.message && "string" == typeof e.name && !qs(e) | |
} | |
function Bs(e) { | |
if (!Ys(e)) | |
return !1; | |
var t = hr(e); | |
return t == h || t == p || "[object AsyncFunction]" == t || "[object Proxy]" == t | |
} | |
function Fs(e) { | |
return "number" == typeof e && e == ru(e) | |
} | |
function Zs(e) { | |
return "number" == typeof e && e > -1 && e % 1 == 0 && e <= 9007199254740991 | |
} | |
function Ys(e) { | |
var t = typeof e; | |
return null != e && ("object" == t || "function" == t) | |
} | |
function Ks(e) { | |
return null != e && "object" == typeof e | |
} | |
var Ws = tt ? xt(tt) : function(e) { | |
return Ks(e) && ri(e) == v | |
} | |
; | |
function zs(e) { | |
return "number" == typeof e || Ks(e) && hr(e) == _ | |
} | |
function qs(e) { | |
if (!Ks(e) || hr(e) != g) | |
return !1; | |
var t = We(e); | |
if (null === t) | |
return !0; | |
var n = Ae.call(t, "constructor") && t.constructor; | |
return "function" == typeof n && n instanceof n && we.call(n) == Se | |
} | |
var Gs = nt ? xt(nt) : function(e) { | |
return Ks(e) && hr(e) == j | |
} | |
; | |
var Hs = rt ? xt(rt) : function(e) { | |
return Ks(e) && ri(e) == m | |
} | |
; | |
function Vs(e) { | |
return "string" == typeof e || !Us(e) && Ks(e) && hr(e) == y | |
} | |
function Xs(e) { | |
return "symbol" == typeof e || Ks(e) && hr(e) == b | |
} | |
var Js = ot ? xt(ot) : function(e) { | |
return Ks(e) && Zs(e.length) && !!Be[hr(e)] | |
} | |
; | |
var $s = Qo(Lr) | |
, eu = Qo((function(e, t) { | |
return e <= t | |
} | |
)); | |
function tu(e) { | |
if (!e) | |
return []; | |
if (Qs(e)) | |
return Vs(e) ? zt(e) : jo(e); | |
if (Je && e[Je]) | |
return function(e) { | |
for (var t, n = []; !(t = e.next()).done; ) | |
n.push(t.value); | |
return n | |
}(e[Je]()); | |
var t = ri(e); | |
return (t == v ? Bt : t == m ? Yt : Tu)(e) | |
} | |
function nu(e) { | |
return e ? (e = iu(e)) === 1 / 0 || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e == e ? e : 0 : 0 === e ? e : 0 | |
} | |
function ru(e) { | |
var t = nu(e) | |
, n = t % 1; | |
return t == t ? n ? t - n : t : 0 | |
} | |
function ou(e) { | |
return e ? Hn(ru(e), 0, 4294967295) : 0 | |
} | |
function iu(e) { | |
if ("number" == typeof e) | |
return e; | |
if (Xs(e)) | |
return NaN; | |
if (Ys(e)) { | |
var t = "function" == typeof e.valueOf ? e.valueOf() : e; | |
e = Ys(t) ? t + "" : t | |
} | |
if ("string" != typeof e) | |
return 0 === e ? e : +e; | |
e = e.replace(G, ""); | |
var n = ie.test(e); | |
return n || ue.test(e) ? Ke(e.slice(2), n ? 2 : 8) : oe.test(e) ? NaN : +e | |
} | |
function su(e) { | |
return mo(e, bu(e)) | |
} | |
function uu(e) { | |
return null == e ? "" : Xr(e) | |
} | |
var au = bo((function(e, t) { | |
if (di(t) || Qs(t)) | |
mo(t, yu(t), e); | |
else | |
for (var n in t) | |
Ae.call(t, n) && Yn(e, n, t[n]) | |
} | |
)) | |
, cu = bo((function(e, t) { | |
mo(t, bu(t), e) | |
} | |
)) | |
, lu = bo((function(e, t, n, r) { | |
mo(t, bu(t), e, r) | |
} | |
)) | |
, fu = bo((function(e, t, n, r) { | |
mo(t, yu(t), e, r) | |
} | |
)) | |
, du = Wo(Gn); | |
var hu = Nr((function(e, t) { | |
e = ve(e); | |
var n = -1 | |
, r = t.length | |
, o = r > 2 ? t[2] : void 0; | |
for (o && ai(t[0], t[1], o) && (r = 1); ++n < r; ) | |
for (var i = t[n], s = bu(i), u = -1, a = s.length; ++u < a; ) { | |
var c = s[u] | |
, l = e[c]; | |
(void 0 === l || Ts(l, be[c]) && !Ae.call(e, c)) && (e[c] = i[c]) | |
} | |
return e | |
} | |
)) | |
, pu = Nr((function(e) { | |
return e.push(void 0, Zo), | |
it(wu, void 0, e) | |
} | |
)); | |
function vu(e, t, n) { | |
var r = null == e ? void 0 : fr(e, t); | |
return void 0 === r ? n : r | |
} | |
function _u(e, t) { | |
return null != e && oi(e, t, _r) | |
} | |
var gu = xo((function(e, t, n) { | |
null != t && "function" != typeof t.toString && (t = Re.call(t)), | |
e[t] = n | |
} | |
), Yu(zu)) | |
, ju = xo((function(e, t, n) { | |
null != t && "function" != typeof t.toString && (t = Re.call(t)), | |
Ae.call(e, t) ? e[t].push(n) : e[t] = [n] | |
} | |
), Xo) | |
, mu = Nr(jr); | |
function yu(e) { | |
return Qs(e) ? Nn(e) : Ar(e) | |
} | |
function bu(e) { | |
return Qs(e) ? Nn(e, !0) : Cr(e) | |
} | |
var Eu = bo((function(e, t, n) { | |
xr(e, t, n) | |
} | |
)) | |
, wu = bo((function(e, t, n, r) { | |
xr(e, t, n, r) | |
} | |
)) | |
, Au = Wo((function(e, t) { | |
var n = {}; | |
if (null == e) | |
return n; | |
var r = !1; | |
t = ht(t, (function(t) { | |
return t = uo(t, e), | |
r || (r = t.length > 1), | |
t | |
} | |
)), | |
mo(e, qo(e), n), | |
r && (n = Vn(n, 7, Yo)); | |
for (var o = t.length; o--; ) | |
$r(n, t[o]); | |
return n | |
} | |
)); | |
var Cu = Wo((function(e, t) { | |
return null == e ? {} : function(e, t) { | |
return Ur(e, t, (function(t, n) { | |
return _u(e, n) | |
} | |
)) | |
}(e, t) | |
} | |
)); | |
function Lu(e, t) { | |
if (null == e) | |
return {}; | |
var n = ht(qo(e), (function(e) { | |
return [e] | |
} | |
)); | |
return t = Xo(t), | |
Ur(e, n, (function(e, n) { | |
return t(e, n[0]) | |
} | |
)) | |
} | |
var Ru = Do(yu) | |
, Su = Do(bu); | |
function Tu(e) { | |
return null == e ? [] : It(e, yu(e)) | |
} | |
var xu = Co((function(e, t, n) { | |
return t = t.toLowerCase(), | |
e + (n ? Iu(t) : t) | |
} | |
)); | |
function Iu(e) { | |
return Du(uu(e).toLowerCase()) | |
} | |
function Ou(e) { | |
return (e = uu(e)) && e.replace(ce, kt).replace(Ue, "") | |
} | |
var Uu = Co((function(e, t, n) { | |
return e + (n ? "-" : "") + t.toLowerCase() | |
} | |
)) | |
, Mu = Co((function(e, t, n) { | |
return e + (n ? " " : "") + t.toLowerCase() | |
} | |
)) | |
, Qu = Ao("toLowerCase"); | |
var ku = Co((function(e, t, n) { | |
return e + (n ? "_" : "") + t.toLowerCase() | |
} | |
)); | |
var Pu = Co((function(e, t, n) { | |
return e + (n ? " " : "") + Du(t) | |
} | |
)); | |
var Nu = Co((function(e, t, n) { | |
return e + (n ? " " : "") + t.toUpperCase() | |
} | |
)) | |
, Du = Ao("toUpperCase"); | |
function Bu(e, t, n) { | |
return e = uu(e), | |
void 0 === (t = n ? void 0 : t) ? function(e) { | |
return Pe.test(e) | |
}(e) ? function(e) { | |
return e.match(Qe) || [] | |
}(e) : function(e) { | |
return e.match(ee) || [] | |
}(e) : e.match(t) || [] | |
} | |
var Fu = Nr((function(e, t) { | |
try { | |
return it(e, void 0, t) | |
} catch (e) { | |
return Ds(e) ? e : new de(e) | |
} | |
} | |
)) | |
, Zu = Wo((function(e, t) { | |
return ut(t, (function(t) { | |
t = Li(t), | |
qn(e, t, js(e[t], e)) | |
} | |
)), | |
e | |
} | |
)); | |
function Yu(e) { | |
return function() { | |
return e | |
} | |
} | |
var Ku = So() | |
, Wu = So(!0); | |
function zu(e) { | |
return e | |
} | |
function qu(e) { | |
return wr("function" == typeof e ? e : Vn(e, 1)) | |
} | |
var Gu = Nr((function(e, t) { | |
return function(n) { | |
return jr(n, e, t) | |
} | |
} | |
)) | |
, Hu = Nr((function(e, t) { | |
return function(n) { | |
return jr(e, n, t) | |
} | |
} | |
)); | |
function Vu(e, t, n) { | |
var r = yu(t) | |
, o = lr(t, r); | |
null != n || Ys(t) && (o.length || !r.length) || (n = t, | |
t = e, | |
e = this, | |
o = lr(t, yu(t))); | |
var i = !(Ys(n) && "chain"in n && !n.chain) | |
, s = Bs(e); | |
return ut(o, (function(n) { | |
var r = t[n]; | |
e[n] = r, | |
s && (e.prototype[n] = function() { | |
var t = this.__chain__; | |
if (i || t) { | |
var n = e(this.__wrapped__) | |
, o = n.__actions__ = jo(this.__actions__); | |
return o.push({ | |
func: r, | |
args: arguments, | |
thisArg: e | |
}), | |
n.__chain__ = t, | |
n | |
} | |
return r.apply(e, pt([this.value()], arguments)) | |
} | |
) | |
} | |
)), | |
e | |
} | |
function Xu() {} | |
var Ju = Oo(ht) | |
, $u = Oo(ct) | |
, ea = Oo(gt); | |
function ta(e) { | |
return ci(e) ? Ct(Li(e)) : function(e) { | |
return function(t) { | |
return fr(t, e) | |
} | |
}(e) | |
} | |
var na = Mo() | |
, ra = Mo(!0); | |
function oa() { | |
return [] | |
} | |
function ia() { | |
return !1 | |
} | |
var sa = Io((function(e, t) { | |
return e + t | |
} | |
), 0) | |
, ua = Po("ceil") | |
, aa = Io((function(e, t) { | |
return e / t | |
} | |
), 1) | |
, ca = Po("floor"); | |
var la, fa = Io((function(e, t) { | |
return e * t | |
} | |
), 1), da = Po("round"), ha = Io((function(e, t) { | |
return e - t | |
} | |
), 0); | |
return Sn.after = function(e, t) { | |
if ("function" != typeof t) | |
throw new je(i); | |
return e = ru(e), | |
function() { | |
if (--e < 1) | |
return t.apply(this, arguments) | |
} | |
} | |
, | |
Sn.ary = _s, | |
Sn.assign = au, | |
Sn.assignIn = cu, | |
Sn.assignInWith = lu, | |
Sn.assignWith = fu, | |
Sn.at = du, | |
Sn.before = gs, | |
Sn.bind = js, | |
Sn.bindAll = Zu, | |
Sn.bindKey = ms, | |
Sn.castArray = function() { | |
if (!arguments.length) | |
return []; | |
var e = arguments[0]; | |
return Us(e) ? e : [e] | |
} | |
, | |
Sn.chain = ts, | |
Sn.chunk = function(e, t, n) { | |
t = (n ? ai(e, t, n) : void 0 === t) ? 1 : sn(ru(t), 0); | |
var o = null == e ? 0 : e.length; | |
if (!o || t < 1) | |
return []; | |
for (var i = 0, s = 0, u = r(Jt(o / t)); i < o; ) | |
u[s++] = Wr(e, i, i += t); | |
return u | |
} | |
, | |
Sn.compact = function(e) { | |
for (var t = -1, n = null == e ? 0 : e.length, r = 0, o = []; ++t < n; ) { | |
var i = e[t]; | |
i && (o[r++] = i) | |
} | |
return o | |
} | |
, | |
Sn.concat = function() { | |
var e = arguments.length; | |
if (!e) | |
return []; | |
for (var t = r(e - 1), n = arguments[0], o = e; o--; ) | |
t[o - 1] = arguments[o]; | |
return pt(Us(n) ? jo(n) : [n], ir(t, 1)) | |
} | |
, | |
Sn.cond = function(e) { | |
var t = null == e ? 0 : e.length | |
, n = Xo(); | |
return e = t ? ht(e, (function(e) { | |
if ("function" != typeof e[1]) | |
throw new je(i); | |
return [n(e[0]), e[1]] | |
} | |
)) : [], | |
Nr((function(n) { | |
for (var r = -1; ++r < t; ) { | |
var o = e[r]; | |
if (it(o[0], this, n)) | |
return it(o[1], this, n) | |
} | |
} | |
)) | |
} | |
, | |
Sn.conforms = function(e) { | |
return function(e) { | |
var t = yu(e); | |
return function(n) { | |
return Xn(n, e, t) | |
} | |
}(Vn(e, 1)) | |
} | |
, | |
Sn.constant = Yu, | |
Sn.countBy = os, | |
Sn.create = function(e, t) { | |
var n = Tn(e); | |
return null == t ? n : zn(n, t) | |
} | |
, | |
Sn.curry = function e(t, n, r) { | |
var o = Bo(t, 8, void 0, void 0, void 0, void 0, void 0, n = r ? void 0 : n); | |
return o.placeholder = e.placeholder, | |
o | |
} | |
, | |
Sn.curryRight = function e(t, n, r) { | |
var o = Bo(t, 16, void 0, void 0, void 0, void 0, void 0, n = r ? void 0 : n); | |
return o.placeholder = e.placeholder, | |
o | |
} | |
, | |
Sn.debounce = ys, | |
Sn.defaults = hu, | |
Sn.defaultsDeep = pu, | |
Sn.defer = bs, | |
Sn.delay = Es, | |
Sn.difference = Ti, | |
Sn.differenceBy = xi, | |
Sn.differenceWith = Ii, | |
Sn.drop = function(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
return r ? Wr(e, (t = n || void 0 === t ? 1 : ru(t)) < 0 ? 0 : t, r) : [] | |
} | |
, | |
Sn.dropRight = function(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
return r ? Wr(e, 0, (t = r - (t = n || void 0 === t ? 1 : ru(t))) < 0 ? 0 : t) : [] | |
} | |
, | |
Sn.dropRightWhile = function(e, t) { | |
return e && e.length ? to(e, Xo(t, 3), !0, !0) : [] | |
} | |
, | |
Sn.dropWhile = function(e, t) { | |
return e && e.length ? to(e, Xo(t, 3), !0) : [] | |
} | |
, | |
Sn.fill = function(e, t, n, r) { | |
var o = null == e ? 0 : e.length; | |
return o ? (n && "number" != typeof n && ai(e, t, n) && (n = 0, | |
r = o), | |
function(e, t, n, r) { | |
var o = e.length; | |
for ((n = ru(n)) < 0 && (n = -n > o ? 0 : o + n), | |
(r = void 0 === r || r > o ? o : ru(r)) < 0 && (r += o), | |
r = n > r ? 0 : ou(r); n < r; ) | |
e[n++] = t; | |
return e | |
}(e, t, n, r)) : [] | |
} | |
, | |
Sn.filter = function(e, t) { | |
return (Us(e) ? lt : or)(e, Xo(t, 3)) | |
} | |
, | |
Sn.flatMap = function(e, t) { | |
return ir(ds(e, t), 1) | |
} | |
, | |
Sn.flatMapDeep = function(e, t) { | |
return ir(ds(e, t), 1 / 0) | |
} | |
, | |
Sn.flatMapDepth = function(e, t, n) { | |
return n = void 0 === n ? 1 : ru(n), | |
ir(ds(e, t), n) | |
} | |
, | |
Sn.flatten = Mi, | |
Sn.flattenDeep = function(e) { | |
return (null == e ? 0 : e.length) ? ir(e, 1 / 0) : [] | |
} | |
, | |
Sn.flattenDepth = function(e, t) { | |
return (null == e ? 0 : e.length) ? ir(e, t = void 0 === t ? 1 : ru(t)) : [] | |
} | |
, | |
Sn.flip = function(e) { | |
return Bo(e, 512) | |
} | |
, | |
Sn.flow = Ku, | |
Sn.flowRight = Wu, | |
Sn.fromPairs = function(e) { | |
for (var t = -1, n = null == e ? 0 : e.length, r = {}; ++t < n; ) { | |
var o = e[t]; | |
r[o[0]] = o[1] | |
} | |
return r | |
} | |
, | |
Sn.functions = function(e) { | |
return null == e ? [] : lr(e, yu(e)) | |
} | |
, | |
Sn.functionsIn = function(e) { | |
return null == e ? [] : lr(e, bu(e)) | |
} | |
, | |
Sn.groupBy = cs, | |
Sn.initial = function(e) { | |
return (null == e ? 0 : e.length) ? Wr(e, 0, -1) : [] | |
} | |
, | |
Sn.intersection = ki, | |
Sn.intersectionBy = Pi, | |
Sn.intersectionWith = Ni, | |
Sn.invert = gu, | |
Sn.invertBy = ju, | |
Sn.invokeMap = ls, | |
Sn.iteratee = qu, | |
Sn.keyBy = fs, | |
Sn.keys = yu, | |
Sn.keysIn = bu, | |
Sn.map = ds, | |
Sn.mapKeys = function(e, t) { | |
var n = {}; | |
return t = Xo(t, 3), | |
ar(e, (function(e, r, o) { | |
qn(n, t(e, r, o), e) | |
} | |
)), | |
n | |
} | |
, | |
Sn.mapValues = function(e, t) { | |
var n = {}; | |
return t = Xo(t, 3), | |
ar(e, (function(e, r, o) { | |
qn(n, r, t(e, r, o)) | |
} | |
)), | |
n | |
} | |
, | |
Sn.matches = function(e) { | |
return Sr(Vn(e, 1)) | |
} | |
, | |
Sn.matchesProperty = function(e, t) { | |
return Tr(e, Vn(t, 1)) | |
} | |
, | |
Sn.memoize = ws, | |
Sn.merge = Eu, | |
Sn.mergeWith = wu, | |
Sn.method = Gu, | |
Sn.methodOf = Hu, | |
Sn.mixin = Vu, | |
Sn.negate = As, | |
Sn.nthArg = function(e) { | |
return e = ru(e), | |
Nr((function(t) { | |
return Ir(t, e) | |
} | |
)) | |
} | |
, | |
Sn.omit = Au, | |
Sn.omitBy = function(e, t) { | |
return Lu(e, As(Xo(t))) | |
} | |
, | |
Sn.once = function(e) { | |
return gs(2, e) | |
} | |
, | |
Sn.orderBy = function(e, t, n, r) { | |
return null == e ? [] : (Us(t) || (t = null == t ? [] : [t]), | |
Us(n = r ? void 0 : n) || (n = null == n ? [] : [n]), | |
Or(e, t, n)) | |
} | |
, | |
Sn.over = Ju, | |
Sn.overArgs = Cs, | |
Sn.overEvery = $u, | |
Sn.overSome = ea, | |
Sn.partial = Ls, | |
Sn.partialRight = Rs, | |
Sn.partition = hs, | |
Sn.pick = Cu, | |
Sn.pickBy = Lu, | |
Sn.property = ta, | |
Sn.propertyOf = function(e) { | |
return function(t) { | |
return null == e ? void 0 : fr(e, t) | |
} | |
} | |
, | |
Sn.pull = Bi, | |
Sn.pullAll = Fi, | |
Sn.pullAllBy = function(e, t, n) { | |
return e && e.length && t && t.length ? Mr(e, t, Xo(n, 2)) : e | |
} | |
, | |
Sn.pullAllWith = function(e, t, n) { | |
return e && e.length && t && t.length ? Mr(e, t, void 0, n) : e | |
} | |
, | |
Sn.pullAt = Zi, | |
Sn.range = na, | |
Sn.rangeRight = ra, | |
Sn.rearg = Ss, | |
Sn.reject = function(e, t) { | |
return (Us(e) ? lt : or)(e, As(Xo(t, 3))) | |
} | |
, | |
Sn.remove = function(e, t) { | |
var n = []; | |
if (!e || !e.length) | |
return n; | |
var r = -1 | |
, o = [] | |
, i = e.length; | |
for (t = Xo(t, 3); ++r < i; ) { | |
var s = e[r]; | |
t(s, r, e) && (n.push(s), | |
o.push(r)) | |
} | |
return Qr(e, o), | |
n | |
} | |
, | |
Sn.rest = function(e, t) { | |
if ("function" != typeof e) | |
throw new je(i); | |
return Nr(e, t = void 0 === t ? t : ru(t)) | |
} | |
, | |
Sn.reverse = Yi, | |
Sn.sampleSize = function(e, t, n) { | |
return t = (n ? ai(e, t, n) : void 0 === t) ? 1 : ru(t), | |
(Us(e) ? Bn : Br)(e, t) | |
} | |
, | |
Sn.set = function(e, t, n) { | |
return null == e ? e : Fr(e, t, n) | |
} | |
, | |
Sn.setWith = function(e, t, n, r) { | |
return r = "function" == typeof r ? r : void 0, | |
null == e ? e : Fr(e, t, n, r) | |
} | |
, | |
Sn.shuffle = function(e) { | |
return (Us(e) ? Fn : Kr)(e) | |
} | |
, | |
Sn.slice = function(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
return r ? (n && "number" != typeof n && ai(e, t, n) ? (t = 0, | |
n = r) : (t = null == t ? 0 : ru(t), | |
n = void 0 === n ? r : ru(n)), | |
Wr(e, t, n)) : [] | |
} | |
, | |
Sn.sortBy = ps, | |
Sn.sortedUniq = function(e) { | |
return e && e.length ? Hr(e) : [] | |
} | |
, | |
Sn.sortedUniqBy = function(e, t) { | |
return e && e.length ? Hr(e, Xo(t, 2)) : [] | |
} | |
, | |
Sn.split = function(e, t, n) { | |
return n && "number" != typeof n && ai(e, t, n) && (t = n = void 0), | |
(n = void 0 === n ? 4294967295 : n >>> 0) ? (e = uu(e)) && ("string" == typeof t || null != t && !Gs(t)) && !(t = Xr(t)) && Dt(e) ? co(zt(e), 0, n) : e.split(t, n) : [] | |
} | |
, | |
Sn.spread = function(e, t) { | |
if ("function" != typeof e) | |
throw new je(i); | |
return t = null == t ? 0 : sn(ru(t), 0), | |
Nr((function(n) { | |
var r = n[t] | |
, o = co(n, 0, t); | |
return r && pt(o, r), | |
it(e, this, o) | |
} | |
)) | |
} | |
, | |
Sn.tail = function(e) { | |
var t = null == e ? 0 : e.length; | |
return t ? Wr(e, 1, t) : [] | |
} | |
, | |
Sn.take = function(e, t, n) { | |
return e && e.length ? Wr(e, 0, (t = n || void 0 === t ? 1 : ru(t)) < 0 ? 0 : t) : [] | |
} | |
, | |
Sn.takeRight = function(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
return r ? Wr(e, (t = r - (t = n || void 0 === t ? 1 : ru(t))) < 0 ? 0 : t, r) : [] | |
} | |
, | |
Sn.takeRightWhile = function(e, t) { | |
return e && e.length ? to(e, Xo(t, 3), !1, !0) : [] | |
} | |
, | |
Sn.takeWhile = function(e, t) { | |
return e && e.length ? to(e, Xo(t, 3)) : [] | |
} | |
, | |
Sn.tap = function(e, t) { | |
return t(e), | |
e | |
} | |
, | |
Sn.throttle = function(e, t, n) { | |
var r = !0 | |
, o = !0; | |
if ("function" != typeof e) | |
throw new je(i); | |
return Ys(n) && (r = "leading"in n ? !!n.leading : r, | |
o = "trailing"in n ? !!n.trailing : o), | |
ys(e, t, { | |
leading: r, | |
maxWait: t, | |
trailing: o | |
}) | |
} | |
, | |
Sn.thru = ns, | |
Sn.toArray = tu, | |
Sn.toPairs = Ru, | |
Sn.toPairsIn = Su, | |
Sn.toPath = function(e) { | |
return Us(e) ? ht(e, Li) : Xs(e) ? [e] : jo(Ci(uu(e))) | |
} | |
, | |
Sn.toPlainObject = su, | |
Sn.transform = function(e, t, n) { | |
var r = Us(e) | |
, o = r || Ps(e) || Js(e); | |
if (t = Xo(t, 4), | |
null == n) { | |
var i = e && e.constructor; | |
n = o ? r ? new i : [] : Ys(e) && Bs(i) ? Tn(We(e)) : {} | |
} | |
return (o ? ut : ar)(e, (function(e, r, o) { | |
return t(n, e, r, o) | |
} | |
)), | |
n | |
} | |
, | |
Sn.unary = function(e) { | |
return _s(e, 1) | |
} | |
, | |
Sn.union = Ki, | |
Sn.unionBy = Wi, | |
Sn.unionWith = zi, | |
Sn.uniq = function(e) { | |
return e && e.length ? Jr(e) : [] | |
} | |
, | |
Sn.uniqBy = function(e, t) { | |
return e && e.length ? Jr(e, Xo(t, 2)) : [] | |
} | |
, | |
Sn.uniqWith = function(e, t) { | |
return t = "function" == typeof t ? t : void 0, | |
e && e.length ? Jr(e, void 0, t) : [] | |
} | |
, | |
Sn.unset = function(e, t) { | |
return null == e || $r(e, t) | |
} | |
, | |
Sn.unzip = qi, | |
Sn.unzipWith = Gi, | |
Sn.update = function(e, t, n) { | |
return null == e ? e : eo(e, t, so(n)) | |
} | |
, | |
Sn.updateWith = function(e, t, n, r) { | |
return r = "function" == typeof r ? r : void 0, | |
null == e ? e : eo(e, t, so(n), r) | |
} | |
, | |
Sn.values = Tu, | |
Sn.valuesIn = function(e) { | |
return null == e ? [] : It(e, bu(e)) | |
} | |
, | |
Sn.without = Hi, | |
Sn.words = Bu, | |
Sn.wrap = function(e, t) { | |
return Ls(so(t), e) | |
} | |
, | |
Sn.xor = Vi, | |
Sn.xorBy = Xi, | |
Sn.xorWith = Ji, | |
Sn.zip = $i, | |
Sn.zipObject = function(e, t) { | |
return oo(e || [], t || [], Yn) | |
} | |
, | |
Sn.zipObjectDeep = function(e, t) { | |
return oo(e || [], t || [], Fr) | |
} | |
, | |
Sn.zipWith = es, | |
Sn.entries = Ru, | |
Sn.entriesIn = Su, | |
Sn.extend = cu, | |
Sn.extendWith = lu, | |
Vu(Sn, Sn), | |
Sn.add = sa, | |
Sn.attempt = Fu, | |
Sn.camelCase = xu, | |
Sn.capitalize = Iu, | |
Sn.ceil = ua, | |
Sn.clamp = function(e, t, n) { | |
return void 0 === n && (n = t, | |
t = void 0), | |
void 0 !== n && (n = (n = iu(n)) == n ? n : 0), | |
void 0 !== t && (t = (t = iu(t)) == t ? t : 0), | |
Hn(iu(e), t, n) | |
} | |
, | |
Sn.clone = function(e) { | |
return Vn(e, 4) | |
} | |
, | |
Sn.cloneDeep = function(e) { | |
return Vn(e, 5) | |
} | |
, | |
Sn.cloneDeepWith = function(e, t) { | |
return Vn(e, 5, t = "function" == typeof t ? t : void 0) | |
} | |
, | |
Sn.cloneWith = function(e, t) { | |
return Vn(e, 4, t = "function" == typeof t ? t : void 0) | |
} | |
, | |
Sn.conformsTo = function(e, t) { | |
return null == t || Xn(e, t, yu(t)) | |
} | |
, | |
Sn.deburr = Ou, | |
Sn.defaultTo = function(e, t) { | |
return null == e || e != e ? t : e | |
} | |
, | |
Sn.divide = aa, | |
Sn.endsWith = function(e, t, n) { | |
e = uu(e), | |
t = Xr(t); | |
var r = e.length | |
, o = n = void 0 === n ? r : Hn(ru(n), 0, r); | |
return (n -= t.length) >= 0 && e.slice(n, o) == t | |
} | |
, | |
Sn.eq = Ts, | |
Sn.escape = function(e) { | |
return (e = uu(e)) && D.test(e) ? e.replace(P, Pt) : e | |
} | |
, | |
Sn.escapeRegExp = function(e) { | |
return (e = uu(e)) && q.test(e) ? e.replace(z, "\\$&") : e | |
} | |
, | |
Sn.every = function(e, t, n) { | |
var r = Us(e) ? ct : nr; | |
return n && ai(e, t, n) && (t = void 0), | |
r(e, Xo(t, 3)) | |
} | |
, | |
Sn.find = is, | |
Sn.findIndex = Oi, | |
Sn.findKey = function(e, t) { | |
return mt(e, Xo(t, 3), ar) | |
} | |
, | |
Sn.findLast = ss, | |
Sn.findLastIndex = Ui, | |
Sn.findLastKey = function(e, t) { | |
return mt(e, Xo(t, 3), cr) | |
} | |
, | |
Sn.floor = ca, | |
Sn.forEach = us, | |
Sn.forEachRight = as, | |
Sn.forIn = function(e, t) { | |
return null == e ? e : sr(e, Xo(t, 3), bu) | |
} | |
, | |
Sn.forInRight = function(e, t) { | |
return null == e ? e : ur(e, Xo(t, 3), bu) | |
} | |
, | |
Sn.forOwn = function(e, t) { | |
return e && ar(e, Xo(t, 3)) | |
} | |
, | |
Sn.forOwnRight = function(e, t) { | |
return e && cr(e, Xo(t, 3)) | |
} | |
, | |
Sn.get = vu, | |
Sn.gt = xs, | |
Sn.gte = Is, | |
Sn.has = function(e, t) { | |
return null != e && oi(e, t, vr) | |
} | |
, | |
Sn.hasIn = _u, | |
Sn.head = Qi, | |
Sn.identity = zu, | |
Sn.includes = function(e, t, n, r) { | |
e = Qs(e) ? e : Tu(e), | |
n = n && !r ? ru(n) : 0; | |
var o = e.length; | |
return n < 0 && (n = sn(o + n, 0)), | |
Vs(e) ? n <= o && e.indexOf(t, n) > -1 : !!o && bt(e, t, n) > -1 | |
} | |
, | |
Sn.indexOf = function(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
if (!r) | |
return -1; | |
var o = null == n ? 0 : ru(n); | |
return o < 0 && (o = sn(r + o, 0)), | |
bt(e, t, o) | |
} | |
, | |
Sn.inRange = function(e, t, n) { | |
return t = nu(t), | |
void 0 === n ? (n = t, | |
t = 0) : n = nu(n), | |
function(e, t, n) { | |
return e >= un(t, n) && e < sn(t, n) | |
}(e = iu(e), t, n) | |
} | |
, | |
Sn.invoke = mu, | |
Sn.isArguments = Os, | |
Sn.isArray = Us, | |
Sn.isArrayBuffer = Ms, | |
Sn.isArrayLike = Qs, | |
Sn.isArrayLikeObject = ks, | |
Sn.isBoolean = function(e) { | |
return !0 === e || !1 === e || Ks(e) && hr(e) == l | |
} | |
, | |
Sn.isBuffer = Ps, | |
Sn.isDate = Ns, | |
Sn.isElement = function(e) { | |
return Ks(e) && 1 === e.nodeType && !qs(e) | |
} | |
, | |
Sn.isEmpty = function(e) { | |
if (null == e) | |
return !0; | |
if (Qs(e) && (Us(e) || "string" == typeof e || "function" == typeof e.splice || Ps(e) || Js(e) || Os(e))) | |
return !e.length; | |
var t = ri(e); | |
if (t == v || t == m) | |
return !e.size; | |
if (di(e)) | |
return !Ar(e).length; | |
for (var n in e) | |
if (Ae.call(e, n)) | |
return !1; | |
return !0 | |
} | |
, | |
Sn.isEqual = function(e, t) { | |
return yr(e, t) | |
} | |
, | |
Sn.isEqualWith = function(e, t, n) { | |
var r = (n = "function" == typeof n ? n : void 0) ? n(e, t) : void 0; | |
return void 0 === r ? yr(e, t, void 0, n) : !!r | |
} | |
, | |
Sn.isError = Ds, | |
Sn.isFinite = function(e) { | |
return "number" == typeof e && nn(e) | |
} | |
, | |
Sn.isFunction = Bs, | |
Sn.isInteger = Fs, | |
Sn.isLength = Zs, | |
Sn.isMap = Ws, | |
Sn.isMatch = function(e, t) { | |
return e === t || br(e, t, $o(t)) | |
} | |
, | |
Sn.isMatchWith = function(e, t, n) { | |
return n = "function" == typeof n ? n : void 0, | |
br(e, t, $o(t), n) | |
} | |
, | |
Sn.isNaN = function(e) { | |
return zs(e) && e != +e | |
} | |
, | |
Sn.isNative = function(e) { | |
if (fi(e)) | |
throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill."); | |
return Er(e) | |
} | |
, | |
Sn.isNil = function(e) { | |
return null == e | |
} | |
, | |
Sn.isNull = function(e) { | |
return null === e | |
} | |
, | |
Sn.isNumber = zs, | |
Sn.isObject = Ys, | |
Sn.isObjectLike = Ks, | |
Sn.isPlainObject = qs, | |
Sn.isRegExp = Gs, | |
Sn.isSafeInteger = function(e) { | |
return Fs(e) && e >= -9007199254740991 && e <= 9007199254740991 | |
} | |
, | |
Sn.isSet = Hs, | |
Sn.isString = Vs, | |
Sn.isSymbol = Xs, | |
Sn.isTypedArray = Js, | |
Sn.isUndefined = function(e) { | |
return void 0 === e | |
} | |
, | |
Sn.isWeakMap = function(e) { | |
return Ks(e) && ri(e) == E | |
} | |
, | |
Sn.isWeakSet = function(e) { | |
return Ks(e) && "[object WeakSet]" == hr(e) | |
} | |
, | |
Sn.join = function(e, t) { | |
return null == e ? "" : rn.call(e, t) | |
} | |
, | |
Sn.kebabCase = Uu, | |
Sn.last = Di, | |
Sn.lastIndexOf = function(e, t, n) { | |
var r = null == e ? 0 : e.length; | |
if (!r) | |
return -1; | |
var o = r; | |
return void 0 !== n && (o = (o = ru(n)) < 0 ? sn(r + o, 0) : un(o, r - 1)), | |
t == t ? function(e, t, n) { | |
for (var r = n + 1; r--; ) | |
if (e[r] === t) | |
return r; | |
return r | |
}(e, t, o) : yt(e, wt, o, !0) | |
} | |
, | |
Sn.lowerCase = Mu, | |
Sn.lowerFirst = Qu, | |
Sn.lt = $s, | |
Sn.lte = eu, | |
Sn.max = function(e) { | |
return e && e.length ? rr(e, zu, pr) : void 0 | |
} | |
, | |
Sn.maxBy = function(e, t) { | |
return e && e.length ? rr(e, Xo(t, 2), pr) : void 0 | |
} | |
, | |
Sn.mean = function(e) { | |
return At(e, zu) | |
} | |
, | |
Sn.meanBy = function(e, t) { | |
return At(e, Xo(t, 2)) | |
} | |
, | |
Sn.min = function(e) { | |
return e && e.length ? rr(e, zu, Lr) : void 0 | |
} | |
, | |
Sn.minBy = function(e, t) { | |
return e && e.length ? rr(e, Xo(t, 2), Lr) : void 0 | |
} | |
, | |
Sn.stubArray = oa, | |
Sn.stubFalse = ia, | |
Sn.stubObject = function() { | |
return {} | |
} | |
, | |
Sn.stubString = function() { | |
return "" | |
} | |
, | |
Sn.stubTrue = function() { | |
return !0 | |
} | |
, | |
Sn.multiply = fa, | |
Sn.nth = function(e, t) { | |
return e && e.length ? Ir(e, ru(t)) : void 0 | |
} | |
, | |
Sn.noConflict = function() { | |
return qe._ === this && (qe._ = Te), | |
this | |
} | |
, | |
Sn.noop = Xu, | |
Sn.now = vs, | |
Sn.pad = function(e, t, n) { | |
e = uu(e); | |
var r = (t = ru(t)) ? Wt(e) : 0; | |
if (!t || r >= t) | |
return e; | |
var o = (t - r) / 2; | |
return Uo($t(o), n) + e + Uo(Jt(o), n) | |
} | |
, | |
Sn.padEnd = function(e, t, n) { | |
e = uu(e); | |
var r = (t = ru(t)) ? Wt(e) : 0; | |
return t && r < t ? e + Uo(t - r, n) : e | |
} | |
, | |
Sn.padStart = function(e, t, n) { | |
e = uu(e); | |
var r = (t = ru(t)) ? Wt(e) : 0; | |
return t && r < t ? Uo(t - r, n) + e : e | |
} | |
, | |
Sn.parseInt = function(e, t, n) { | |
return n || null == t ? t = 0 : t && (t = +t), | |
cn(uu(e).replace(H, ""), t || 0) | |
} | |
, | |
Sn.random = function(e, t, n) { | |
if (n && "boolean" != typeof n && ai(e, t, n) && (t = n = void 0), | |
void 0 === n && ("boolean" == typeof t ? (n = t, | |
t = void 0) : "boolean" == typeof e && (n = e, | |
e = void 0)), | |
void 0 === e && void 0 === t ? (e = 0, | |
t = 1) : (e = nu(e), | |
void 0 === t ? (t = e, | |
e = 0) : t = nu(t)), | |
e > t) { | |
var r = e; | |
e = t, | |
t = r | |
} | |
if (n || e % 1 || t % 1) { | |
var o = ln(); | |
return un(e + o * (t - e + Ye("1e-" + ((o + "").length - 1))), t) | |
} | |
return kr(e, t) | |
} | |
, | |
Sn.reduce = function(e, t, n) { | |
var r = Us(e) ? vt : Rt | |
, o = arguments.length < 3; | |
return r(e, Xo(t, 4), n, o, er) | |
} | |
, | |
Sn.reduceRight = function(e, t, n) { | |
var r = Us(e) ? _t : Rt | |
, o = arguments.length < 3; | |
return r(e, Xo(t, 4), n, o, tr) | |
} | |
, | |
Sn.repeat = function(e, t, n) { | |
return t = (n ? ai(e, t, n) : void 0 === t) ? 1 : ru(t), | |
Pr(uu(e), t) | |
} | |
, | |
Sn.replace = function() { | |
var e = arguments | |
, t = uu(e[0]); | |
return e.length < 3 ? t : t.replace(e[1], e[2]) | |
} | |
, | |
Sn.result = function(e, t, n) { | |
var r = -1 | |
, o = (t = uo(t, e)).length; | |
for (o || (o = 1, | |
e = void 0); ++r < o; ) { | |
var i = null == e ? void 0 : e[Li(t[r])]; | |
void 0 === i && (r = o, | |
i = n), | |
e = Bs(i) ? i.call(e) : i | |
} | |
return e | |
} | |
, | |
Sn.round = da, | |
Sn.runInContext = e, | |
Sn.sample = function(e) { | |
return (Us(e) ? Dn : Dr)(e) | |
} | |
, | |
Sn.size = function(e) { | |
if (null == e) | |
return 0; | |
if (Qs(e)) | |
return Vs(e) ? Wt(e) : e.length; | |
var t = ri(e); | |
return t == v || t == m ? e.size : Ar(e).length | |
} | |
, | |
Sn.snakeCase = ku, | |
Sn.some = function(e, t, n) { | |
var r = Us(e) ? gt : zr; | |
return n && ai(e, t, n) && (t = void 0), | |
r(e, Xo(t, 3)) | |
} | |
, | |
Sn.sortedIndex = function(e, t) { | |
return qr(e, t) | |
} | |
, | |
Sn.sortedIndexBy = function(e, t, n) { | |
return Gr(e, t, Xo(n, 2)) | |
} | |
, | |
Sn.sortedIndexOf = function(e, t) { | |
var n = null == e ? 0 : e.length; | |
if (n) { | |
var r = qr(e, t); | |
if (r < n && Ts(e[r], t)) | |
return r | |
} | |
return -1 | |
} | |
, | |
Sn.sortedLastIndex = function(e, t) { | |
return qr(e, t, !0) | |
} | |
, | |
Sn.sortedLastIndexBy = function(e, t, n) { | |
return Gr(e, t, Xo(n, 2), !0) | |
} | |
, | |
Sn.sortedLastIndexOf = function(e, t) { | |
if (null == e ? 0 : e.length) { | |
var n = qr(e, t, !0) - 1; | |
if (Ts(e[n], t)) | |
return n | |
} | |
return -1 | |
} | |
, | |
Sn.startCase = Pu, | |
Sn.startsWith = function(e, t, n) { | |
return e = uu(e), | |
n = null == n ? 0 : Hn(ru(n), 0, e.length), | |
t = Xr(t), | |
e.slice(n, n + t.length) == t | |
} | |
, | |
Sn.subtract = ha, | |
Sn.sum = function(e) { | |
return e && e.length ? St(e, zu) : 0 | |
} | |
, | |
Sn.sumBy = function(e, t) { | |
return e && e.length ? St(e, Xo(t, 2)) : 0 | |
} | |
, | |
Sn.template = function(e, t, n) { | |
var r = Sn.templateSettings; | |
n && ai(e, t, n) && (t = void 0), | |
e = uu(e), | |
t = lu({}, t, r, Fo); | |
var o, i, s = lu({}, t.imports, r.imports, Fo), u = yu(s), a = It(s, u), c = 0, l = t.interpolate || le, f = "__p += '", d = _e((t.escape || le).source + "|" + l.source + "|" + (l === Z ? ne : le).source + "|" + (t.evaluate || le).source + "|$", "g"), h = "//# sourceURL=" + (Ae.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++De + "]") + "\n"; | |
e.replace(d, (function(t, n, r, s, u, a) { | |
return r || (r = s), | |
f += e.slice(c, a).replace(fe, Nt), | |
n && (o = !0, | |
f += "' +\n__e(" + n + ") +\n'"), | |
u && (i = !0, | |
f += "';\n" + u + ";\n__p += '"), | |
r && (f += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"), | |
c = a + t.length, | |
t | |
} | |
)), | |
f += "';\n"; | |
var p = Ae.call(t, "variable") && t.variable; | |
p || (f = "with (obj) {\n" + f + "\n}\n"), | |
f = (i ? f.replace(U, "") : f).replace(M, "$1").replace(Q, "$1;"), | |
f = "function(" + (p || "obj") + ") {\n" + (p ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (o ? ", __e = _.escape" : "") + (i ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + f + "return __p\n}"; | |
var v = Fu((function() { | |
return he(u, h + "return " + f).apply(void 0, a) | |
} | |
)); | |
if (v.source = f, | |
Ds(v)) | |
throw v; | |
return v | |
} | |
, | |
Sn.times = function(e, t) { | |
if ((e = ru(e)) < 1 || e > 9007199254740991) | |
return []; | |
var n = 4294967295 | |
, r = un(e, 4294967295); | |
e -= 4294967295; | |
for (var o = Tt(r, t = Xo(t)); ++n < e; ) | |
t(n); | |
return o | |
} | |
, | |
Sn.toFinite = nu, | |
Sn.toInteger = ru, | |
Sn.toLength = ou, | |
Sn.toLower = function(e) { | |
return uu(e).toLowerCase() | |
} | |
, | |
Sn.toNumber = iu, | |
Sn.toSafeInteger = function(e) { | |
return e ? Hn(ru(e), -9007199254740991, 9007199254740991) : 0 === e ? e : 0 | |
} | |
, | |
Sn.toString = uu, | |
Sn.toUpper = function(e) { | |
return uu(e).toUpperCase() | |
} | |
, | |
Sn.trim = function(e, t, n) { | |
if ((e = uu(e)) && (n || void 0 === t)) | |
return e.replace(G, ""); | |
if (!e || !(t = Xr(t))) | |
return e; | |
var r = zt(e) | |
, o = zt(t); | |
return co(r, Ut(r, o), Mt(r, o) + 1).join("") | |
} | |
, | |
Sn.trimEnd = function(e, t, n) { | |
if ((e = uu(e)) && (n || void 0 === t)) | |
return e.replace(V, ""); | |
if (!e || !(t = Xr(t))) | |
return e; | |
var r = zt(e); | |
return co(r, 0, Mt(r, zt(t)) + 1).join("") | |
} | |
, | |
Sn.trimStart = function(e, t, n) { | |
if ((e = uu(e)) && (n || void 0 === t)) | |
return e.replace(H, ""); | |
if (!e || !(t = Xr(t))) | |
return e; | |
var r = zt(e); | |
return co(r, Ut(r, zt(t))).join("") | |
} | |
, | |
Sn.truncate = function(e, t) { | |
var n = 30 | |
, r = "..."; | |
if (Ys(t)) { | |
var o = "separator"in t ? t.separator : o; | |
n = "length"in t ? ru(t.length) : n, | |
r = "omission"in t ? Xr(t.omission) : r | |
} | |
var i = (e = uu(e)).length; | |
if (Dt(e)) { | |
var s = zt(e); | |
i = s.length | |
} | |
if (n >= i) | |
return e; | |
var u = n - Wt(r); | |
if (u < 1) | |
return r; | |
var a = s ? co(s, 0, u).join("") : e.slice(0, u); | |
if (void 0 === o) | |
return a + r; | |
if (s && (u += a.length - u), | |
Gs(o)) { | |
if (e.slice(u).search(o)) { | |
var c, l = a; | |
for (o.global || (o = _e(o.source, uu(re.exec(o)) + "g")), | |
o.lastIndex = 0; c = o.exec(l); ) | |
var f = c.index; | |
a = a.slice(0, void 0 === f ? u : f) | |
} | |
} else if (e.indexOf(Xr(o), u) != u) { | |
var d = a.lastIndexOf(o); | |
d > -1 && (a = a.slice(0, d)) | |
} | |
return a + r | |
} | |
, | |
Sn.unescape = function(e) { | |
return (e = uu(e)) && N.test(e) ? e.replace(k, qt) : e | |
} | |
, | |
Sn.uniqueId = function(e) { | |
var t = ++Ce; | |
return uu(e) + t | |
} | |
, | |
Sn.upperCase = Nu, | |
Sn.upperFirst = Du, | |
Sn.each = us, | |
Sn.eachRight = as, | |
Sn.first = Qi, | |
Vu(Sn, (la = {}, | |
ar(Sn, (function(e, t) { | |
Ae.call(Sn.prototype, t) || (la[t] = e) | |
} | |
)), | |
la), { | |
chain: !1 | |
}), | |
Sn.VERSION = "4.17.20", | |
ut(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], (function(e) { | |
Sn[e].placeholder = Sn | |
} | |
)), | |
ut(["drop", "take"], (function(e, t) { | |
On.prototype[e] = function(n) { | |
n = void 0 === n ? 1 : sn(ru(n), 0); | |
var r = this.__filtered__ && !t ? new On(this) : this.clone(); | |
return r.__filtered__ ? r.__takeCount__ = un(n, r.__takeCount__) : r.__views__.push({ | |
size: un(n, 4294967295), | |
type: e + (r.__dir__ < 0 ? "Right" : "") | |
}), | |
r | |
} | |
, | |
On.prototype[e + "Right"] = function(t) { | |
return this.reverse()[e](t).reverse() | |
} | |
} | |
)), | |
ut(["filter", "map", "takeWhile"], (function(e, t) { | |
var n = t + 1 | |
, r = 1 == n || 3 == n; | |
On.prototype[e] = function(e) { | |
var t = this.clone(); | |
return t.__iteratees__.push({ | |
iteratee: Xo(e, 3), | |
type: n | |
}), | |
t.__filtered__ = t.__filtered__ || r, | |
t | |
} | |
} | |
)), | |
ut(["head", "last"], (function(e, t) { | |
var n = "take" + (t ? "Right" : ""); | |
On.prototype[e] = function() { | |
return this[n](1).value()[0] | |
} | |
} | |
)), | |
ut(["initial", "tail"], (function(e, t) { | |
var n = "drop" + (t ? "" : "Right"); | |
On.prototype[e] = function() { | |
return this.__filtered__ ? new On(this) : this[n](1) | |
} | |
} | |
)), | |
On.prototype.compact = function() { | |
return this.filter(zu) | |
} | |
, | |
On.prototype.find = function(e) { | |
return this.filter(e).head() | |
} | |
, | |
On.prototype.findLast = function(e) { | |
return this.reverse().find(e) | |
} | |
, | |
On.prototype.invokeMap = Nr((function(e, t) { | |
return "function" == typeof e ? new On(this) : this.map((function(n) { | |
return jr(n, e, t) | |
} | |
)) | |
} | |
)), | |
On.prototype.reject = function(e) { | |
return this.filter(As(Xo(e))) | |
} | |
, | |
On.prototype.slice = function(e, t) { | |
e = ru(e); | |
var n = this; | |
return n.__filtered__ && (e > 0 || t < 0) ? new On(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)), | |
void 0 !== t && (n = (t = ru(t)) < 0 ? n.dropRight(-t) : n.take(t - e)), | |
n) | |
} | |
, | |
On.prototype.takeRightWhile = function(e) { | |
return this.reverse().takeWhile(e).reverse() | |
} | |
, | |
On.prototype.toArray = function() { | |
return this.take(4294967295) | |
} | |
, | |
ar(On.prototype, (function(e, t) { | |
var n = /^(?:filter|find|map|reject)|While$/.test(t) | |
, r = /^(?:head|last)$/.test(t) | |
, o = Sn[r ? "take" + ("last" == t ? "Right" : "") : t] | |
, i = r || /^find/.test(t); | |
o && (Sn.prototype[t] = function() { | |
var t = this.__wrapped__ | |
, s = r ? [1] : arguments | |
, u = t instanceof On | |
, a = s[0] | |
, c = u || Us(t) | |
, l = function(e) { | |
var t = o.apply(Sn, pt([e], s)); | |
return r && f ? t[0] : t | |
}; | |
c && n && "function" == typeof a && 1 != a.length && (u = c = !1); | |
var f = this.__chain__ | |
, d = !!this.__actions__.length | |
, h = i && !f | |
, p = u && !d; | |
if (!i && c) { | |
t = p ? t : new On(this); | |
var v = e.apply(t, s); | |
return v.__actions__.push({ | |
func: ns, | |
args: [l], | |
thisArg: void 0 | |
}), | |
new In(v,f) | |
} | |
return h && p ? e.apply(this, s) : (v = this.thru(l), | |
h ? r ? v.value()[0] : v.value() : v) | |
} | |
) | |
} | |
)), | |
ut(["pop", "push", "shift", "sort", "splice", "unshift"], (function(e) { | |
var t = me[e] | |
, n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru" | |
, r = /^(?:pop|shift)$/.test(e); | |
Sn.prototype[e] = function() { | |
var e = arguments; | |
if (r && !this.__chain__) { | |
var o = this.value(); | |
return t.apply(Us(o) ? o : [], e) | |
} | |
return this[n]((function(n) { | |
return t.apply(Us(n) ? n : [], e) | |
} | |
)) | |
} | |
} | |
)), | |
ar(On.prototype, (function(e, t) { | |
var n = Sn[t]; | |
if (n) { | |
var r = n.name + ""; | |
Ae.call(mn, r) || (mn[r] = []), | |
mn[r].push({ | |
name: t, | |
func: n | |
}) | |
} | |
} | |
)), | |
mn[To(void 0, 2).name] = [{ | |
name: "wrapper", | |
func: void 0 | |
}], | |
On.prototype.clone = function() { | |
var e = new On(this.__wrapped__); | |
return e.__actions__ = jo(this.__actions__), | |
e.__dir__ = this.__dir__, | |
e.__filtered__ = this.__filtered__, | |
e.__iteratees__ = jo(this.__iteratees__), | |
e.__takeCount__ = this.__takeCount__, | |
e.__views__ = jo(this.__views__), | |
e | |
} | |
, | |
On.prototype.reverse = function() { | |
if (this.__filtered__) { | |
var e = new On(this); | |
e.__dir__ = -1, | |
e.__filtered__ = !0 | |
} else | |
(e = this.clone()).__dir__ *= -1; | |
return e | |
} | |
, | |
On.prototype.value = function() { | |
var e = this.__wrapped__.value() | |
, t = this.__dir__ | |
, n = Us(e) | |
, r = t < 0 | |
, o = n ? e.length : 0 | |
, i = function(e, t, n) { | |
var r = -1 | |
, o = n.length; | |
for (; ++r < o; ) { | |
var i = n[r] | |
, s = i.size; | |
switch (i.type) { | |
case "drop": | |
e += s; | |
break; | |
case "dropRight": | |
t -= s; | |
break; | |
case "take": | |
t = un(t, e + s); | |
break; | |
case "takeRight": | |
e = sn(e, t - s) | |
} | |
} | |
return { | |
start: e, | |
end: t | |
} | |
}(0, o, this.__views__) | |
, s = i.start | |
, u = i.end | |
, a = u - s | |
, c = r ? u : s - 1 | |
, l = this.__iteratees__ | |
, f = l.length | |
, d = 0 | |
, h = un(a, this.__takeCount__); | |
if (!n || !r && o == a && h == a) | |
return no(e, this.__actions__); | |
var p = []; | |
e: for (; a-- && d < h; ) { | |
for (var v = -1, _ = e[c += t]; ++v < f; ) { | |
var g = l[v] | |
, j = g.iteratee | |
, m = g.type | |
, y = j(_); | |
if (2 == m) | |
_ = y; | |
else if (!y) { | |
if (1 == m) | |
continue e; | |
break e | |
} | |
} | |
p[d++] = _ | |
} | |
return p | |
} | |
, | |
Sn.prototype.at = rs, | |
Sn.prototype.chain = function() { | |
return ts(this) | |
} | |
, | |
Sn.prototype.commit = function() { | |
return new In(this.value(),this.__chain__) | |
} | |
, | |
Sn.prototype.next = function() { | |
void 0 === this.__values__ && (this.__values__ = tu(this.value())); | |
var e = this.__index__ >= this.__values__.length; | |
return { | |
done: e, | |
value: e ? void 0 : this.__values__[this.__index__++] | |
} | |
} | |
, | |
Sn.prototype.plant = function(e) { | |
for (var t, n = this; n instanceof xn; ) { | |
var r = Si(n); | |
r.__index__ = 0, | |
r.__values__ = void 0, | |
t ? o.__wrapped__ = r : t = r; | |
var o = r; | |
n = n.__wrapped__ | |
} | |
return o.__wrapped__ = e, | |
t | |
} | |
, | |
Sn.prototype.reverse = function() { | |
var e = this.__wrapped__; | |
if (e instanceof On) { | |
var t = e; | |
return this.__actions__.length && (t = new On(this)), | |
(t = t.reverse()).__actions__.push({ | |
func: ns, | |
args: [Yi], | |
thisArg: void 0 | |
}), | |
new In(t,this.__chain__) | |
} | |
return this.thru(Yi) | |
} | |
, | |
Sn.prototype.toJSON = Sn.prototype.valueOf = Sn.prototype.value = function() { | |
return no(this.__wrapped__, this.__actions__) | |
} | |
, | |
Sn.prototype.first = Sn.prototype.head, | |
Je && (Sn.prototype[Je] = function() { | |
return this | |
} | |
), | |
Sn | |
}(); | |
qe._ = Gt, | |
void 0 === (o = function() { | |
return Gt | |
} | |
.call(t, n, t, r)) || (r.exports = o) | |
} | |
).call(this) | |
} | |
).call(this, n("./node_modules/webpack/buildin/global.js"), n("./node_modules/webpack/buildin/module.js")(e)) | |
}, | |
"./node_modules/postal/lib/postal.js": function(e, t, n) { | |
var r, o, i; | |
i = this, | |
r = [n("./node_modules/lodash/lodash.js")], | |
void 0 === (o = function(e) { | |
return function(e, t, r) { | |
var o = t && t.postal | |
, i = t && t._; | |
i && i !== e && (e = e.noConflict()); | |
var s = { | |
configuration: e.extend({}, { | |
DEFAULT_CHANNEL: "/", | |
SYSTEM_CHANNEL: "postal", | |
enableSystemMessages: !0, | |
cacheKeyDelimiter: "|", | |
autoCompactResolver: !1 | |
}) | |
} | |
, u = s.configuration | |
, a = function(e, t) { | |
this.bus = t, | |
this.channel = e || u.DEFAULT_CHANNEL | |
}; | |
a.prototype.subscribe = function() { | |
return this.bus.subscribe({ | |
channel: this.channel, | |
topic: 1 === arguments.length ? arguments[0].topic : arguments[0], | |
callback: 1 === arguments.length ? arguments[0].callback : arguments[1] | |
}) | |
} | |
, | |
a.prototype.publish = function() { | |
var t, n = {}; | |
if ("string" == typeof arguments[0] ? (n.topic = arguments[0], | |
n.data = arguments[1], | |
t = arguments[2]) : (n = arguments[0], | |
t = arguments[1]), | |
"object" != typeof n) | |
throw new Error("The first argument to ChannelDefinition.publish should be either an envelope object or a string topic."); | |
n.headers = e.extend(n.headers || { | |
resolverNoCache: u.resolverNoCache | |
}), | |
n.channel = this.channel, | |
this.bus.publish(n, t) | |
} | |
; | |
var c = function(e, t, n) { | |
if (3 !== arguments.length) | |
throw new Error("You must provide a channel, topic and callback when creating a SubscriptionDefinition instance."); | |
if (0 === t.length) | |
throw new Error("Topics cannot be empty"); | |
this.channel = e, | |
this.topic = t, | |
this.callback = n, | |
this.pipeline = [], | |
this.cacheKeys = [], | |
this._context = r | |
} | |
, l = function() { | |
var t; | |
return function(n) { | |
var r = !1; | |
return "string" == typeof n ? (r = n === t, | |
t = n) : (r = e.isEqual(n, t), | |
t = e.extend({}, n)), | |
!r | |
} | |
} | |
, f = function() { | |
var t = []; | |
return function(n) { | |
var r = !e.some(t, (function(t) { | |
return e.isEqual(n, t) | |
} | |
)); | |
return r && t.push(n), | |
r | |
} | |
}; | |
c.prototype = { | |
catch: function(e) { | |
var t = this.callback; | |
return this.callback = function() { | |
try { | |
t.apply(this, arguments) | |
} catch (t) { | |
e(t, arguments[0]) | |
} | |
} | |
, | |
this | |
}, | |
defer: function() { | |
return this.delay(0) | |
}, | |
disposeAfter: function(t) { | |
if ("number" != typeof t || t <= 0) | |
throw new Error("The value provided to disposeAfter (maxCalls) must be a number greater than zero."); | |
var n = e.after(t, this.unsubscribe.bind(this)); | |
return this.pipeline.push((function(e, t, r) { | |
r(e, t), | |
n() | |
} | |
)), | |
this | |
}, | |
distinct: function() { | |
return this.constraint(new f) | |
}, | |
distinctUntilChanged: function() { | |
return this.constraint(new l) | |
}, | |
invokeSubscriber: function(e, t) { | |
if (!this.inactive) { | |
var n = this | |
, r = n.pipeline | |
, o = r.length | |
, i = n._context | |
, s = -1 | |
, u = !1; | |
return o ? (r = r.concat([n.callback]), | |
function e(t, a) { | |
(s += 1) < o ? r[s].call(i, t, a, e) : (n.callback.call(i, t, a), | |
u = !0) | |
}(e, t)) : (n.callback.call(i, e, t), | |
u = !0), | |
u | |
} | |
}, | |
logError: function() { | |
var e; | |
return console && (e = console.warn ? console.warn : console.log, | |
this.catch(e)), | |
this | |
}, | |
once: function() { | |
return this.disposeAfter(1) | |
}, | |
subscribe: function(e) { | |
return this.callback = e, | |
this | |
}, | |
unsubscribe: function() { | |
this.inactive || s.unsubscribe(this) | |
}, | |
constraint: function(e) { | |
if ("function" != typeof e) | |
throw new Error("Predicate constraint must be a function"); | |
return this.pipeline.push((function(t, n, r) { | |
e.call(this, t, n) && r(t, n) | |
} | |
)), | |
this | |
}, | |
constraints: function(t) { | |
var n = this; | |
return e.each(t, (function(e) { | |
n.constraint(e) | |
} | |
)), | |
n | |
}, | |
context: function(e) { | |
return this._context = e, | |
this | |
}, | |
debounce: function(t, n) { | |
if ("number" != typeof t) | |
throw new Error("Milliseconds must be a number"); | |
var r = {}; | |
return 1 == !!n && (r.leading = !0, | |
r.trailing = !1), | |
this.pipeline.push(e.debounce((function(e, t, n) { | |
n(e, t) | |
} | |
), t, r)), | |
this | |
}, | |
delay: function(e) { | |
if ("number" != typeof e) | |
throw new Error("Milliseconds must be a number"); | |
return this.pipeline.push((function(t, n, r) { | |
setTimeout((function() { | |
r(t, n) | |
} | |
), e) | |
} | |
)), | |
this | |
}, | |
throttle: function(t) { | |
if ("number" != typeof t) | |
throw new Error("Milliseconds must be a number"); | |
return this.pipeline.push(e.throttle((function(e, t, n) { | |
n(e, t) | |
} | |
), t)), | |
this | |
} | |
}, | |
u.resolver = { | |
cache: {}, | |
regex: {}, | |
enableCache: !0, | |
compare: function(t, n, r) { | |
var o, i, s, a = n + u.cacheKeyDelimiter + t, c = this.cache[a], l = r || {}, f = this.enableCache && !l.resolverNoCache; | |
return !0 === c ? c : -1 === t.indexOf("#") && -1 === t.indexOf("*") ? (c = n === t, | |
f && (this.cache[a] = c), | |
c) : ((i = this.regex[t]) || (o = "^" + e.map(t.split("."), (function(e) { | |
var t = ""; | |
return s && (t = "#" !== s ? "\\.\\b" : "\\b"), | |
s = e, | |
t += "#" === e ? "[\\s\\S]*" : "*" === e ? "[^.]+" : e | |
} | |
)).join("") + "$", | |
i = this.regex[t] = new RegExp(o)), | |
c = i.test(n), | |
f && (this.cache[a] = c), | |
c) | |
}, | |
reset: function() { | |
this.cache = {}, | |
this.regex = {} | |
}, | |
purge: function(t) { | |
var n = this | |
, r = u.cacheKeyDelimiter; | |
if (void 0 === t) | |
this.reset(); | |
else { | |
var o = !0 === t.compact ? function(e, t) { | |
var o = t.split(r); | |
0 === s.getSubscribersFor({ | |
topic: o[0] | |
}).length && delete n.cache[t] | |
} | |
: function(e, o) { | |
var i = o.split(r) | |
, s = i[0] | |
, u = i[1]; | |
void 0 !== t.topic && t.topic !== s || void 0 !== t.binding && t.binding !== u || delete n.cache[o] | |
} | |
; | |
e.each(this.cache, o) | |
} | |
} | |
}; | |
var d = 0 | |
, h = [] | |
, p = 0; | |
function v(e, t, n) { | |
return function(r, o, i) { | |
r === e && i.splice(o, 1), | |
0 === i.length && delete n[t] | |
} | |
} | |
function _(e, t, n, r, o) { | |
var i = o && o.headers || {}; | |
return function(o) { | |
u.resolver.compare(o.topic, e, i) && (i.resolverNoCache || ((t[n] = t[n] || []).push(o), | |
o.cacheKeys.push(n)), | |
r && r(o)) | |
} | |
} | |
function g(e, t) { | |
return { | |
channel: u.SYSTEM_CHANNEL, | |
topic: "subscription." + e, | |
data: { | |
event: "subscription." + e, | |
channel: t.channel, | |
topic: t.topic | |
} | |
} | |
} | |
var j = g.bind(r, "created") | |
, m = g.bind(r, "removed"); | |
if (e.extend(s, { | |
cache: {}, | |
subscriptions: {}, | |
wireTaps: [], | |
ChannelDefinition: a, | |
SubscriptionDefinition: c, | |
channel: function(e) { | |
return new a(e,this) | |
}, | |
addWireTap: function(e) { | |
var t = this; | |
return t.wireTaps.push(e), | |
function() { | |
var n = t.wireTaps.indexOf(e); | |
-1 !== n && t.wireTaps.splice(n, 1) | |
} | |
}, | |
noConflict: function() { | |
if ("undefined" == typeof window || "undefined" != typeof window && n("./node_modules/webpack/buildin/amd-options.js")) | |
throw new Error("noConflict can only be used in browser clients which aren't using AMD modules"); | |
return t.postal = o, | |
this | |
}, | |
getSubscribersFor: function(t) { | |
var n = []; | |
return e.each(this.subscriptions, (function(r) { | |
e.each(r, (function(r) { | |
n = n.concat(e.filter(r, function(t, n) { | |
return "function" == typeof t ? t : t ? function(r) { | |
var o = 0 | |
, i = 0; | |
return e.each(t, (function(e, s) { | |
o += 1, | |
("topic" === s && n.compare(r.topic, t.topic, { | |
resolverNoCache: !0 | |
}) || "context" === s && t.context === r._context || r[s] === t[s]) && (i += 1) | |
} | |
)), | |
o === i | |
} | |
: function() { | |
return !0 | |
} | |
}(t, u.resolver))) | |
} | |
)) | |
} | |
)), | |
n | |
}, | |
publish: function(t, n) { | |
++d; | |
var r = t.channel = t.channel || u.DEFAULT_CHANNEL | |
, o = t.topic; | |
t.timeStamp = new Date, | |
this.wireTaps.length && e.each(this.wireTaps, (function(e) { | |
e(t.data, t, d) | |
} | |
)); | |
var i = r + u.cacheKeyDelimiter + o | |
, a = this.cache[i] | |
, c = 0 | |
, l = 0; | |
if (a) | |
e.each(a, (function(e) { | |
e.invokeSubscriber(t.data, t) ? l++ : c++ | |
} | |
)); | |
else { | |
var f = _(o, this.cache, i, (function(e) { | |
e.invokeSubscriber(t.data, t) ? l++ : c++ | |
} | |
), t); | |
e.each(this.subscriptions[r], (function(t) { | |
e.each(t, f) | |
} | |
)) | |
} | |
0 == --d && function() { | |
for (; h.length; ) | |
s.unsubscribe(h.shift()) | |
}(), | |
n && n({ | |
activated: l, | |
skipped: c | |
}) | |
}, | |
reset: function() { | |
this.unsubscribeFor(), | |
u.resolver.reset(), | |
this.subscriptions = {}, | |
this.cache = {} | |
}, | |
subscribe: function(t) { | |
var n, r = this.subscriptions, o = new c(t.channel || u.DEFAULT_CHANNEL,t.topic,t.callback), i = r[o.channel], s = o.channel.length; | |
i || (i = r[o.channel] = {}), | |
(n = r[o.channel][o.topic]) || (n = r[o.channel][o.topic] = []), | |
n.push(o); | |
var a = this.cache; | |
return e.each(e.keys(a), (function(e) { | |
e.substr(0, s) === o.channel && _(e.split(u.cacheKeyDelimiter)[1], a, e)(o) | |
} | |
)), | |
u.enableSystemMessages && this.publish(j(o)), | |
o | |
}, | |
unsubscribe: function() { | |
for (var t, n, r, o, i = arguments.length, s = 0; s < i; s++) { | |
if ((t = arguments[s]).inactive = !0, | |
d) | |
return void h.push(t); | |
if (r = (n = this.subscriptions[t.channel]) && n[t.topic]) { | |
var a = r.length; | |
for (o = 0; o < a; ) { | |
if (r[o] === t) { | |
r.splice(o, 1); | |
break | |
} | |
o += 1 | |
} | |
if (0 === r.length && (delete n[t.topic], | |
e.keys(n).length || delete this.subscriptions[t.channel]), | |
t.cacheKeys && t.cacheKeys.length) | |
for (var c; c = t.cacheKeys.pop(); ) | |
e.each(this.cache[c], v(t, c, this.cache)); | |
if ("function" == typeof u.resolver.purge) { | |
var l = !0 === u.autoCompactResolver ? 0 : "number" == typeof u.autoCompactResolver && u.autoCompactResolver - 1; | |
l >= 0 && p === l ? (u.resolver.purge({ | |
compact: !0 | |
}), | |
p = 0) : l >= 0 && p < l && (p += 1) | |
} | |
} | |
u.enableSystemMessages && this.publish(m(t)) | |
} | |
}, | |
unsubscribeFor: function(e) { | |
var t = []; | |
this.subscriptions && (t = this.getSubscribersFor(e), | |
this.unsubscribe.apply(this, t)) | |
} | |
}), | |
t && Object.prototype.hasOwnProperty.call(t, "__postalReady__") && e.isArray(t.__postalReady__)) | |
for (; t.__postalReady__.length; ) | |
t.__postalReady__.shift().onReady(s); | |
return s | |
}(e, i) | |
} | |
.apply(t, r)) || (e.exports = o) | |
}, | |
"./node_modules/sha1/sha1.js": function(e, t, n) { | |
(function(t) { | |
var r, o, i, s; | |
r = n("./node_modules/crypt/crypt.js"), | |
o = n("./node_modules/charenc/charenc.js").utf8, | |
i = n("./node_modules/charenc/charenc.js").bin, | |
(s = function(e, n) { | |
var s = r.wordsToBytes(function(e) { | |
e.constructor == String ? e = o.stringToBytes(e) : void 0 !== t && "function" == typeof t.isBuffer && t.isBuffer(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || (e = e.toString()); | |
var n = r.bytesToWords(e) | |
, i = 8 * e.length | |
, s = [] | |
, u = 1732584193 | |
, a = -271733879 | |
, c = -1732584194 | |
, l = 271733878 | |
, f = -1009589776; | |
n[i >> 5] |= 128 << 24 - i % 32, | |
n[15 + (i + 64 >>> 9 << 4)] = i; | |
for (var d = 0; d < n.length; d += 16) { | |
for (var h = u, p = a, v = c, _ = l, g = f, j = 0; j < 80; j++) { | |
if (j < 16) | |
s[j] = n[d + j]; | |
else { | |
var m = s[j - 3] ^ s[j - 8] ^ s[j - 14] ^ s[j - 16]; | |
s[j] = m << 1 | m >>> 31 | |
} | |
var y = (u << 5 | u >>> 27) + f + (s[j] >>> 0) + (j < 20 ? 1518500249 + (a & c | ~a & l) : j < 40 ? 1859775393 + (a ^ c ^ l) : j < 60 ? (a & c | a & l | c & l) - 1894007588 : (a ^ c ^ l) - 899497514); | |
f = l, | |
l = c, | |
c = a << 30 | a >>> 2, | |
a = u, | |
u = y | |
} | |
u += h, | |
a += p, | |
c += v, | |
l += _, | |
f += g | |
} | |
return [u, a, c, l, f] | |
}(e)); | |
return n && n.asBytes ? s : n && n.asString ? i.bytesToString(s) : r.bytesToHex(s) | |
} | |
)._blocksize = 16, | |
s._digestsize = 20, | |
e.exports = s | |
} | |
).call(this, n("./node_modules/buffer/index.js").Buffer) | |
}, | |
"./node_modules/webpack/buildin/amd-options.js": function(e, t) { | |
(function(t) { | |
e.exports = t | |
} | |
).call(this, {}) | |
}, | |
"./node_modules/webpack/buildin/global.js": function(e, t) { | |
var n; | |
n = function() { | |
return this | |
}(); | |
try { | |
n = n || new Function("return this")() | |
} catch (e) { | |
"object" == typeof window && (n = window) | |
} | |
e.exports = n | |
}, | |
"./node_modules/webpack/buildin/module.js": function(e, t) { | |
e.exports = function(e) { | |
return e.webpackPolyfill || (e.deprecate = function() {} | |
, | |
e.paths = [], | |
e.children || (e.children = []), | |
Object.defineProperty(e, "loaded", { | |
enumerable: !0, | |
get: function() { | |
return e.l | |
} | |
}), | |
Object.defineProperty(e, "id", { | |
enumerable: !0, | |
get: function() { | |
return e.i | |
} | |
}), | |
e.webpackPolyfill = 1), | |
e | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(window.webpackJsonp = window.webpackJsonp || []).push([[11], { | |
"./src/index.js": function(o, e, n) { | |
"use strict"; | |
n.r(e); | |
var i, t = n("./node_modules/react/index.js"), r = n.n(t), s = n("./node_modules/react-dom/index.js"), d = n("./node_modules/shitty-qs/index.js"), l = n.n(d), c = (n("./node_modules/isomorphic-fetch/fetch-npm-browserify.js"), | |
n("./node_modules/svg4everybody/dist/svg4everybody.js")), a = n.n(c), f = n.p + "src/config.json"; | |
function w(o, e, n, t) { | |
i || (i = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var r = o && o.defaultProps | |
, s = arguments.length - 3; | |
if (e || 0 === s || (e = { | |
children: void 0 | |
}), | |
1 === s) | |
e.children = t; | |
else if (s > 1) { | |
for (var d = new Array(s), l = 0; l < s; l++) | |
d[l] = arguments[l + 3]; | |
e.children = d | |
} | |
if (e && r) | |
for (var c in r) | |
void 0 === e[c] && (e[c] = r[c]); | |
else | |
e || (e = r || {}); | |
return { | |
$$typeof: i, | |
type: o, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: e, | |
_owner: null | |
} | |
} | |
a()(), | |
window.tolino = {}, | |
window.tolino.react = r.a.version, | |
window.tolino.git = {}; | |
const u = r.a.lazy(()=>Promise.all([n.e(0), n.e(1), n.e(8), n.e(9), n.e(23)]).then(n.bind(null, "./src/app.js"))); | |
const p = l()(location.search); | |
window.history.replaceState({}, "tolinoWeb", "index.html" + window.location.hash), | |
async function(o) { | |
try { | |
const e = await fetch(f); | |
if (!e.ok) | |
throw new Error("response malformed"); | |
window.tolino.config = await e.json(), | |
Object(s.render)(w(t.Suspense, { | |
fallback: w("div", {}) | |
}, void 0, w(u, { | |
params: o | |
})), document.getElementById("outer-container")) | |
} catch (o) { | |
document.write("no local configuration could be loaded", o) | |
} | |
}(p) | |
}, | |
0: function(o, e, n) { | |
o.exports = n("./src/index.js") | |
} | |
}, [[0, 19, 5, 6, 17, 10, 14, 20, 21, 37]]]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(o) { | |
function e(e) { | |
for (var n, a, l = e[0], u = e[1], c = e[2], f = 0, p = []; f < l.length; f++) | |
a = l[f], | |
Object.prototype.hasOwnProperty.call(r, a) && r[a] && p.push(r[a][0]), | |
r[a] = 0; | |
for (n in u) | |
Object.prototype.hasOwnProperty.call(u, n) && (o[n] = u[n]); | |
for (s && s(e); p.length; ) | |
p.shift()(); | |
return i.push.apply(i, c || []), | |
t() | |
} | |
function t() { | |
for (var o, e = 0; e < i.length; e++) { | |
for (var t = i[e], n = !0, l = 1; l < t.length; l++) { | |
var u = t[l]; | |
0 !== r[u] && (n = !1) | |
} | |
n && (i.splice(e--, 1), | |
o = a(a.s = t[0])) | |
} | |
return o | |
} | |
var n = {} | |
, r = { | |
19: 0 | |
} | |
, i = []; | |
function a(e) { | |
if (n[e]) | |
return n[e].exports; | |
var t = n[e] = { | |
i: e, | |
l: !1, | |
exports: {} | |
}; | |
return o[e].call(t.exports, t, t.exports, a), | |
t.l = !0, | |
t.exports | |
} | |
a.e = function(o) { | |
var e = [] | |
, t = r[o]; | |
if (0 !== t) | |
if (t) | |
e.push(t[2]); | |
else { | |
var n = new Promise((function(e, n) { | |
t = r[o] = [e, n] | |
} | |
)); | |
e.push(t[2] = n); | |
var i, l = document.createElement("script"); | |
l.charset = "utf-8", | |
l.timeout = 120, | |
a.nc && l.setAttribute("nonce", a.nc), | |
l.src = function(o) { | |
return a.p + "assets/scripts/" + ({ | |
0: "react-fela", | |
1: "prop-types", | |
2: "tolino-family-manage~tolino-family-share~tolino-home~tolino-mybooks~tolino-search", | |
3: "tolino-family-share~tolino-mybooks~tolino-product-details~tolino-search", | |
4: "pdfjs-dist", | |
7: "tolino-audiobook~tolino-product-details", | |
8: "core-js", | |
9: "fela-plugin-named-media-query", | |
12: "memoize-one", | |
13: "normalize-wheel", | |
15: "pako", | |
16: "path-browserify", | |
18: "react-window", | |
22: "tolino-account", | |
23: "tolino-app", | |
24: "tolino-audiobook", | |
25: "tolino-epub", | |
26: "tolino-family-create", | |
27: "tolino-family-info", | |
28: "tolino-family-manage", | |
29: "tolino-family-share", | |
30: "tolino-help", | |
31: "tolino-home", | |
32: "tolino-mybooks", | |
33: "tolino-pdf", | |
34: "tolino-product-details", | |
35: "tolino-read", | |
36: "tolino-search" | |
}[o] || o) + ".js" | |
}(o); | |
var u = new Error; | |
i = function(e) { | |
l.onerror = l.onload = null, | |
clearTimeout(c); | |
var t = r[o]; | |
if (0 !== t) { | |
if (t) { | |
var n = e && ("load" === e.type ? "missing" : e.type) | |
, i = e && e.target && e.target.src; | |
u.message = "Loading chunk " + o + " failed.\n(" + n + ": " + i + ")", | |
u.name = "ChunkLoadError", | |
u.type = n, | |
u.request = i, | |
t[1](u) | |
} | |
r[o] = void 0 | |
} | |
} | |
; | |
var c = setTimeout((function() { | |
i({ | |
type: "timeout", | |
target: l | |
}) | |
} | |
), 12e4); | |
l.onerror = l.onload = i, | |
document.head.appendChild(l) | |
} | |
return Promise.all(e) | |
} | |
, | |
a.m = o, | |
a.c = n, | |
a.d = function(o, e, t) { | |
a.o(o, e) || Object.defineProperty(o, e, { | |
enumerable: !0, | |
get: t | |
}) | |
} | |
, | |
a.r = function(o) { | |
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(o, Symbol.toStringTag, { | |
value: "Module" | |
}), | |
Object.defineProperty(o, "__esModule", { | |
value: !0 | |
}) | |
} | |
, | |
a.t = function(o, e) { | |
if (1 & e && (o = a(o)), | |
8 & e) | |
return o; | |
if (4 & e && "object" == typeof o && o && o.__esModule) | |
return o; | |
var t = Object.create(null); | |
if (a.r(t), | |
Object.defineProperty(t, "default", { | |
enumerable: !0, | |
value: o | |
}), | |
2 & e && "string" != typeof o) | |
for (var n in o) | |
a.d(t, n, function(e) { | |
return o[e] | |
} | |
.bind(null, n)); | |
return t | |
} | |
, | |
a.n = function(o) { | |
var e = o && o.__esModule ? function() { | |
return o.default | |
} | |
: function() { | |
return o | |
} | |
; | |
return a.d(e, "a", e), | |
e | |
} | |
, | |
a.o = function(o, e) { | |
return Object.prototype.hasOwnProperty.call(o, e) | |
} | |
, | |
a.p = "", | |
a.oe = function(o) { | |
throw console.error(o), | |
o | |
} | |
; | |
var l = window.webpackJsonp = window.webpackJsonp || [] | |
, u = l.push.bind(l); | |
l.push = e, | |
l = l.slice(); | |
for (var c = 0; c < l.length; c++) | |
e(l[c]); | |
var s = u; | |
t() | |
}([]); |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(window.webpackJsonp = window.webpackJsonp || []).push([[23], { | |
"./musketeer/components/UIActivityIndicator/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./musketeer/components/UIActivityIndicator/node_modules/react-fela/es/index.js"), o = n("./node_modules/react/index.js"), s = n.n(o), a = n("./musketeer/components/UIActivityIndicator/node_modules/prop-types/index.js"), u = n.n(a), l = n("./musketeer/components/UIPrimitives/index.js"), c = n("./musketeer/components/UITools/index.js"), d = n("./musketeer/components/UIModalBlocker/index.js"), f = n("./musketeer/components/UIIcon/index.js"); | |
function h() { | |
return (h = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function p(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
class m extends s.a.Component { | |
constructor(e) { | |
super(e), | |
this.state = { | |
visible: e.visible | |
} | |
} | |
render() { | |
const {styles: e} = this.props | |
, t = this.props.testId + "-modalBlocker"; | |
let n = null | |
, r = null | |
, i = null; | |
if (this.props.refNode && this.props.refNode.getBoundingClientRect) { | |
let e = this.props.refNode.getBoundingClientRect(); | |
e && (n = { | |
left: (e.left + e.width) / 2 + "px", | |
top: (e.top + e.height) / 2 + "px" | |
}, | |
i = { | |
left: e.left, | |
top: e.top | |
}, | |
r = { | |
height: e.height, | |
width: e.width | |
}) | |
} | |
return p(s.a.Fragment, {}, void 0, this.props.useModalBlocker && p(d.a, { | |
testId: t, | |
removeOnClick: !1, | |
transparent: this.props.modalBlockerIsTransparent, | |
visible: this.props.useModalBlocker, | |
position: i, | |
dimensions: r | |
}, "UIModalBlocker"), s.a.createElement(l.h, h({}, c.b.getStylesForPlatform(e.iconContainer), { | |
style: n, | |
key: "iconContainer" | |
}, c.c.getTestAttr(this.props.testId)), p(f.a, { | |
icon: "sync", | |
additionalStyles: e.icon | |
}))) | |
} | |
} | |
m.propTypes = { | |
modalBlockerIsTransparent: u.a.bool, | |
onVisibilityChange: u.a.func, | |
refNode: u.a.any, | |
useModalBlocker: u.a.bool, | |
visible: u.a.bool.isRequired | |
}, | |
m.defaultProps = { | |
modalBlockerIsTransparent: !1, | |
useModalBlocker: !0, | |
visible: !1 | |
}; | |
var b = m; | |
t.a = Object(i.b)(Object(i.a)((function(e) { | |
const t = e.theme | |
, n = t.colors | |
, r = t.variables; | |
return { | |
iconContainer: { | |
backgroundColor: n.accent, | |
borderRadius: r.basicUnit / 2 + "px", | |
color: n.primary, | |
height: 8 * r.basicUnit + "px", | |
left: "50%", | |
position: "fixed", | |
top: "50%", | |
transform: "translate(-50%, -50%)", | |
width: 8 * r.basicUnit + "px", | |
zIndex: r.zIndexModalBlockerContent | |
}, | |
icon: { | |
fill: n.primary + " !important", | |
animation: "rotate360 1.5s linear infinite", | |
height: 8 * r.basicUnit + "px !important", | |
width: 8 * r.basicUnit + "px !important" | |
} | |
} | |
} | |
))(b)) | |
}, | |
"./musketeer/components/UIButton/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./musketeer/themes/tolinode/mixins.js"), s = n("./node_modules/react/index.js"), a = n.n(s), u = n("./node_modules/prop-types/index.js"), l = n.n(u), c = n("./musketeer/components/UIPrimitives/index.js"), d = n("./musketeer/components/UITools/index.js"), f = n("./musketeer/components/UIIcon/index.js"); | |
function h() { | |
return (h = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function p(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
const m = { | |
FLAT: "flat", | |
RAISED: "raised" | |
} | |
, b = { | |
SMALL: "small", | |
BIG: "big" | |
} | |
, g = { | |
LEFT: "left", | |
RIGHT: "right" | |
}; | |
class y extends a.a.Component { | |
render() { | |
const {styles: e} = this.props | |
, t = { | |
button: [e.uiButton, e["type" + d.a.uppercaseFirstLetter(this.props.type)], this.props.typeVariant ? [e["typeVariant" + d.a.uppercaseFirstLetter(this.props.typeVariant)], e["typeVariant" + d.a.uppercaseFirstLetter(this.props.typeVariant) + d.a.uppercaseFirstLetter(this.props.type)]].join(" ") : null, this.props.icon ? e.icon : null, this.props.icon && this.props.iconAlign ? e["iconAlign" + d.a.uppercaseFirstLetter(this.props.iconAlign)] : null, this.props.disabled ? [e.disabled, e["type" + d.a.uppercaseFirstLetter(this.props.type) + "Disabled"]].join(" ") : null, this.props.active ? [e.active, e["type" + d.a.uppercaseFirstLetter(this.props.type) + "Active"]].join(" ") : null, this.props.className ? this.props.className : null], | |
buttonText: [e.text] | |
}; | |
return a.a.createElement(c.h, h({}, d.b.getStylesForPlatform(t.button), { | |
onClick: this.props.disabled ? null : this.props.onClick | |
}, d.c.getTestAttr(this.props.testId)), this.props.icon && p(f.a, { | |
icon: this.props.icon, | |
displayVariant: this.props.typeVariant === b.BIG ? "buttonNoPadding" : "button" | |
}), this.props.text && a.a.createElement(c.c, d.b.getStylesForPlatform(t.buttonText), this.props.text)) | |
} | |
} | |
y.propTypes = { | |
color: l.a.string, | |
disabled: l.a.bool, | |
icon: l.a.string, | |
iconAlign: l.a.oneOf(Object.values(g)), | |
onClick: l.a.func, | |
testId: l.a.string, | |
text: l.a.string, | |
type: l.a.oneOf(Object.values(m)), | |
typeVariant: l.a.oneOf(Object.values(b)) | |
}, | |
y.defaultProps = { | |
iconAlign: g.LEFT, | |
type: m.FLAT | |
}; | |
var v = y; | |
t.a = Object(i.e)(Object(i.c)((function(e) { | |
const {theme: t, color: n} = e | |
, {colors: r, variables: i} = t; | |
return { | |
uiButton: { | |
backgroundColor: "inherit", | |
color: null != n ? n : r.accent, | |
fontSize: i.fontSizeLarge + "rem", | |
fontFamily: "ui-bold", | |
height: 6 * i.basicUnit, | |
lineHeight: .6 * i.basicUnit + "rem", | |
minWidth: "fit-content", | |
paddingLeft: 2 * i.basicUnit, | |
paddingRight: 2 * i.basicUnit, | |
textAlign: "center", | |
whiteSpace: "nowrap", | |
width: "fit-content", | |
":hover": { | |
cursor: "pointer" | |
} | |
}, | |
text: Object.assign({ | |
display: "table-cell", | |
flex: 1, | |
padding: "0 " + i.basicUnit / 2 + "px" | |
}, o.a.textEllipsis()), | |
typeFlat: { | |
":hover": { | |
textDecoration: "underline" | |
}, | |
":active": { | |
textDecoration: "none" | |
} | |
}, | |
typeRaised: { | |
backgroundColor: r.primary, | |
border: "1px solid " + (null != n ? n : r.accent), | |
borderRadius: 3 * i.basicUnit + "px", | |
lineHeight: .58 * i.basicUnit + "rem", | |
":hover": { | |
backgroundColor: null != n ? n : r.accent, | |
color: r.primary | |
} | |
}, | |
typeVariantSmall: { | |
height: 4.5 * i.basicUnit, | |
lineHeight: .45 * i.basicUnit + "rem" | |
}, | |
typeVariantSmallRaised: { | |
lineHeight: .43 * i.basicUnit + "rem" | |
}, | |
disabled: { | |
":hover": { | |
cursor: "inherit" | |
} | |
}, | |
typeFlatDisabled: { | |
color: r.disabled, | |
":hover": { | |
textDecoration: "none" | |
} | |
}, | |
typeRaisedDisabled: { | |
backgroundColor: r.disabled + " !important", | |
border: "none !important", | |
color: r.primary + " !important", | |
":hover": { | |
backgroundColor: r.disabled + " !important" | |
} | |
}, | |
typeRaisedActive: { | |
backgroundColor: r.accent12 + " !important", | |
border: "none !important", | |
color: r.accent + " !important", | |
":hover": { | |
backgroundColor: r.accent12 + " !important" | |
} | |
}, | |
icon: { | |
alignItems: "center", | |
display: "flex", | |
justifyContent: "center" | |
}, | |
iconAlignRight: { | |
flexDirection: "row-reverse" | |
} | |
} | |
} | |
))(v)) | |
}, | |
"./musketeer/components/UICheckBox/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./node_modules/react/index.js"), s = n.n(o), a = n("./musketeer/components/UICheckBox/node_modules/prop-types/index.js"), u = n.n(a), l = n("./musketeer/components/UIIcon/index.js"), c = n("./musketeer/components/UILabel/index.js"), d = n("./musketeer/components/UIPrimitives/index.js"), f = n("./musketeer/components/UITools/index.js"); | |
function h() { | |
return (h = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function p(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function m(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
class b extends s.a.Component { | |
constructor(e) { | |
super(e), | |
m(this, "onCheckBoxChange", ()=>{ | |
if (this.props.disabled) | |
return; | |
const e = !this.state.isChecked; | |
this.setState({ | |
isChecked: e | |
}), | |
"function" == typeof this.props.onValueChange && this.props.onValueChange(e) | |
} | |
), | |
this.state = { | |
isChecked: e.value | |
} | |
} | |
render() { | |
const {label: e, styles: t, testId: n} = this.props | |
, r = n + "" + (this.state.isChecked ? "-checked" : "-unchecked"); | |
return s.a.createElement(d.h, h({ | |
onClick: this.onCheckBoxChange | |
}, f.c.getTestAttr(n), Object(f.d)(t.checkBoxContainer)), p(l.a, { | |
icon: this.state.isChecked ? "checkbox-checked" : "checkbox-unchecked", | |
additionalStyles: [t.checkBox, this.state.isChecked ? t.checkBoxChecked : null], | |
testId: r | |
}), e && p(c.b, { | |
type: "small", | |
numberOfLines: 1, | |
additionalStyles: t.checkBoxLabel | |
}, void 0, e)) | |
} | |
} | |
m(b, "propTypes", { | |
disabled: u.a.bool, | |
label: u.a.string, | |
onValueChange: u.a.func, | |
testId: u.a.string, | |
value: u.a.bool | |
}); | |
t.a = Object(i.e)(Object(i.c)((function({disabled: e, theme: t}) { | |
const n = t.variables.basicUnit | |
, r = t.colors; | |
return { | |
checkBoxContainer: { | |
display: "flex", | |
alignItems: "center", | |
height: 6 * n | |
}, | |
checkBox: { | |
color: e ? r.disabled : r.secondary, | |
fill: "currentColor", | |
marginRight: n, | |
paddingLeft: 0, | |
paddingRight: 0, | |
width: 3 * n | |
}, | |
checkBoxChecked: { | |
color: e ? r.disabled : r.accent | |
}, | |
checkBoxLabel: {} | |
} | |
} | |
))(b)) | |
}, | |
"./musketeer/components/UICover/assets/fallback-cover-audio.svg": function(e, t, n) { | |
"use strict"; | |
t.a = n.p + "musketeer/components/UICover/assets/fallback-cover-audio.svg" | |
}, | |
"./musketeer/components/UICover/assets/fallback-cover-read.svg": function(e, t, n) { | |
"use strict"; | |
t.a = n.p + "musketeer/components/UICover/assets/fallback-cover-read.svg" | |
}, | |
"./musketeer/components/UICover/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./musketeer/components/UICover/node_modules/react-fela/es/index.js") | |
, i = n("./musketeer/components/UIPrimitives/Platform.js") | |
, o = n("./musketeer/components/UITools/index.js") | |
, s = n("./node_modules/react/index.js") | |
, a = n.n(s) | |
, u = n("./musketeer/components/UIPrimitives/index.js") | |
, l = n("./musketeer/components/UICover/assets/fallback-cover-read.svg") | |
, c = n("./musketeer/components/UICover/assets/fallback-cover-audio.svg") | |
, d = n("./musketeer/components/UICover/worker/cover.worker.js") | |
, f = n.n(d) | |
, h = n("./musketeer/components/UICover/worker/resize.worker.js") | |
, p = n.n(h); | |
function m() { | |
return (m = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
const b = { | |
opacity: .3, | |
backgroundColor: "rgb(204,204,204)" | |
} | |
, g = f()() | |
, y = p()(); | |
g.addEventListener("message", (function(e) { | |
const t = e && e.data; | |
if (!v[t.coverUri] || 0 === v[t.coverUri].length) | |
return; | |
v[t.coverUri].forEach(e=>e.resolve(t)), | |
v[t.coverUri].length = 0 | |
} | |
)), | |
y.addEventListener("message", (function(e) { | |
const t = e && e.data; | |
if (!_[t.coverUri] || 0 === _[t.coverUri].length) | |
return; | |
_[t.coverUri].forEach(e=>e.resolve(t)), | |
_[t.coverUri].length = 0 | |
} | |
)); | |
const v = {} | |
, _ = {}; | |
function w(e, t) { | |
return v[e] || (v[e] = []), | |
new Promise((n,r)=>{ | |
v[e].push({ | |
resolve: n, | |
reject: r | |
}), | |
t ? function(e) { | |
const t = new Image; | |
t.onload = ()=>{ | |
v[e] && 0 !== v[e].length && (v[e].forEach(n=>{ | |
n.resolve({ | |
blobUri: e, | |
dimensions: { | |
width: t.naturalWidth, | |
height: t.naturalHeight, | |
isStored: !1 | |
} | |
}) | |
} | |
), | |
v[e].length = 0, | |
t.onerror = t.onload = null) | |
} | |
, | |
t.onerror = n=>{ | |
v[e].forEach(e=>{ | |
e.reject(n) | |
} | |
), | |
v[e].length = 0, | |
t.onerror = t.onload = null | |
} | |
, | |
t.src = e | |
}(e) : 1 === v[e].length && g.postMessage({ | |
coverUri: e | |
}) | |
} | |
).finally(()=>{ | |
v[e] && 0 === v[e].length && (v[e] = null) | |
} | |
) | |
} | |
const S = a.a.memo((function(e) { | |
const {additionalStyles: t, className: n, itemType: r, styles: i, coverUri: d, onCoverClick: f, shouldRefreshOn: h, width: p, height: g} = e | |
, S = Object(s.useRef)() | |
, [E,j] = Object(s.useState)(null) | |
, [x,O] = Object(s.useState)(null); | |
return Object(s.useEffect)(()=>{ | |
j({ | |
blobUri: "AUDIOBOOK" === e.itemType ? c.a : l.a | |
}) | |
} | |
, [r]), | |
Object(s.useEffect)(()=>{ | |
let t = e.direct | |
, n = !1; | |
return d && (d.indexOf("blob:") >= 0 && (t = !0), | |
w(d, t).then(e=>{ | |
n || j(e) | |
} | |
)), | |
()=>{ | |
n = !0, | |
v[d] && 0 === v[d].length && (v[d] = null) | |
} | |
} | |
, [d]), | |
Object(s.useLayoutEffect)(()=>{ | |
let t = !1; | |
return E && E.dimensions && d ? function(e, t, n) { | |
const {coverUri: r, dimensions: i, blobUri: o} = e; | |
return _[r] || (_[r] = []), | |
new Promise((n,o)=>{ | |
if (e.error || !e.dimensions) | |
return o(); | |
_[r].push({ | |
resolve: n, | |
reject: o | |
}), | |
y.postMessage({ | |
coverUri: r, | |
dimensions: i, | |
container: { | |
height: t.current && t.current.clientHeight, | |
width: t.current && t.current.clientWidth | |
} | |
}) | |
} | |
).then(e=>{ | |
const t = n.bottomAlignment ? "bottom" : "top"; | |
"function" == typeof n.onImageScaled && n.onImageScaled(e.container.width, e.container.height, e.scaled.scaledImage.width, e.scaled.scaledImage.height); | |
const r = { | |
backgroundImage: "url(" + o + ")", | |
height: e.scaled.heightInPercent, | |
width: e.scaled.widthInPercent, | |
minHeight: n.theme.variables.uiCoverImageMinHeightPercent + "%", | |
backgroundSize: "cover", | |
[t]: 0 | |
}; | |
return n.disabled && (r = { | |
...r, | |
...b | |
}), | |
r | |
} | |
).catch(()=>{ | |
console.error("Can't resize image without imageData dimensions") | |
} | |
).finally(()=>{ | |
_[r] && 0 === _[r].length && (_[r] = null) | |
} | |
) | |
}(E, S, e).then(e=>{ | |
t || O(e) | |
} | |
) : E && e.disabled ? O(b) : O({ | |
backgroundSize: "contain", | |
backgroundPositionY: 0 | |
}), | |
()=>{ | |
t = !0, | |
_[d] && 0 === _[d].length && (_[d] = null) | |
} | |
} | |
, [E, h, p, g]), | |
a.a.createElement(u.h, m({ | |
ref: S | |
}, o.c.getTestAttr(e.testId), Object(o.d)([i.coverImageContainer, n, t]), { | |
onClick: ()=>{ | |
!e.disabled && f && f() | |
} | |
}), a.a.createElement(u.h, m({}, Object(o.d)(i.coverImage), { | |
style: x | |
})), a.a.createElement(u.h, m({}, Object(o.d)(i.coverReflection), { | |
style: { | |
backgroundSize: "cover", | |
...x, | |
backgroundImage: "inherit" | |
} | |
}))) | |
} | |
)); | |
S.defaultProps = { | |
reflection: !0, | |
disabled: !1, | |
direct: !1, | |
bottomAlignment: !0 | |
}; | |
var E = S; | |
const j = Object(r.b)(Object(r.a)((function(e) { | |
const t = n("./musketeer/components/UICover/styles.common.js").default(e); | |
let r; | |
switch (i.a.OS) { | |
case "android": | |
r = n("./musketeer/components/UICover/styles.android.js").default(e); | |
break; | |
case "ios": | |
r = n("./musketeer/components/UICover/styles.ios.js").default(e); | |
break; | |
default: | |
r = n("./musketeer/components/UICover/styles.web.js").default(e) | |
} | |
return o.a.deepmerge(t, r) | |
} | |
))(E)); | |
t.a = j | |
}, | |
"./musketeer/components/UICover/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UICover/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
var r = n("./musketeer/modules/tolino-shared/index.js") | |
, i = n("./musketeer/components/UICover/assets/fallback-cover-read.svg") | |
, o = n("./musketeer/components/UICover/assets/fallback-cover-audio.svg") | |
, s = n.p + "musketeer/components/UICover/assets/book_reflection.svg"; | |
t.default = function({width: e, height: t, fullSize: n, itemType: a, reflection: u, theme: l}) { | |
const {colors: c, fonts: d, mixins: f, variables: h} = l | |
, p = a === r.j.ENTITLEMENT_TYPES.AUDIOBOOK | |
, m = p ? o.a : i.a | |
, b = { | |
display: "inline-flex", | |
overflow: "hidden", | |
position: "relative", | |
width: "100%", | |
height: "100%" | |
}; | |
let g; | |
return !n && t && e && (b.height = t, | |
b.width = e), | |
u ? (g = { | |
backgroundSize: "cover", | |
backgroundRepeat: "no-repeat", | |
backgroundPosition: "50% 50%", | |
position: "absolute", | |
width: "100%", | |
height: "100%" | |
}, | |
p ? g.background = "linear-gradient(-60deg, rgba(255,255,255,0.18671218487394958) 12%, rgba(255,255,255,0.34077380952380953) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,0) 52%)" : g.backgroundImage = "url('" + s + "') !important") : g = { | |
display: "none" | |
}, | |
{ | |
coverImageContainer: b, | |
coverImage: { | |
backgroundImage: "url('" + m + "')", | |
backgroundSize: "cover", | |
backgroundRepeat: "no-repeat", | |
backgroundPosition: "50% 50%", | |
position: "absolute", | |
width: "100%", | |
height: "100%", | |
transition: "background ease-out 0.3s", | |
boxShadow: h.dropShadowGridViewItem | |
}, | |
coverReflection: g | |
} | |
} | |
}, | |
"./musketeer/components/UICover/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UICover/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UICover/worker/cover.worker.js": function(e, t, n) { | |
e.exports = function() { | |
return new Worker(n.p + "cover.worker.js") | |
} | |
}, | |
"./musketeer/components/UICover/worker/resize.worker.js": function(e, t, n) { | |
e.exports = function() { | |
return new Worker(n.p + "resize.worker.js") | |
} | |
}, | |
"./musketeer/components/UICoverDialog/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UICoverDialog/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function({colors: e, fonts: t, mixins: n, variables: r}) { | |
return { | |
container: Object.assign(n.globalPaddingHelper(), { | |
display: "flex", | |
flexDirection: "column", | |
minWidth: 40 * r.basicUnit | |
}), | |
cover: { | |
display: "flex", | |
justifyContent: "center", | |
maxHeight: 34 * r.basicUnit | |
}, | |
buttons: { | |
display: "flex", | |
justifyContent: "flex-end" | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UICoverDialog/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UICoverDialog/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function({variables: e}) { | |
return { | |
dialogContainer: { | |
marginTop: e.uiTextDialogContainerMarginVertical, | |
marginBottom: e.uiTextDialogContainerMarginVertical, | |
marginLeft: e.uiTextDialogContainerMarginHorizontal, | |
marginRight: e.uiTextDialogContainerMarginHorizontal, | |
maxWidth: e.uiTextDialogContainerMaxWidth | |
}, | |
dialogHeaderImage: { | |
backgroundRepeat: "no-repeat", | |
backgroundPosition: "center", | |
backgroundSize: "contain" | |
}, | |
dialogContent: { | |
marginTop: e.uiTextDialogDescriptionContainerMarginTop, | |
minHeight: e.uiTextDialogDescriptionContainerMinHeight, | |
maxHeight: e.uiTextDialogDescriptionContainerMaxHeight | |
}, | |
dialogButtonPane: { | |
marginTop: e.uiTextDialogButtonBarContainerMarginTop | |
}, | |
dialogButton: { | |
marginLeft: e.uiTextDialogButtonMarginHorizontal, | |
marginRight: e.uiTextDialogButtonMarginHorizontal | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UIDialog/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./musketeer/components/UIPrimitives/Platform.js"), s = n("./musketeer/components/UITools/index.js"), a = n("./node_modules/react/index.js"), u = n.n(a), l = n("./musketeer/components/UIDialog/node_modules/prop-types/index.js"), c = n.n(l), d = n("./musketeer/components/UIPrimitives/index.js"), f = n("./musketeer/components/UIButton/index.js"), h = n("./musketeer/components/UILabel/index.js"), p = n("./musketeer/components/UIPopUp/index.js"); | |
function m(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function b() { | |
return (b = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function g(e) { | |
const {buttons: t=[], styles: n} = e | |
, r = t.map((e,t)=>u.a.createElement(f.a, b({ | |
key: t, | |
typeVariant: "small", | |
additionalStyles: n.dialogButton, | |
testId: "dialogButton-" + t | |
}, e))); | |
return e.visible && m(p.a, { | |
visible: !0, | |
modalDisabled: !1, | |
onRequestClose: e.onRequestClose | |
}, void 0, u.a.createElement(d.h, b({ | |
key: "ui-dialog" | |
}, s.c.getTestAttr(e.testId), Object(s.d)(n.dialogContainer)), e.headerImage && u.a.createElement(d.h, b({}, Object(s.d)(n.dialogHeaderImage), { | |
style: { | |
backgroundImage: "url(" + e.headerImage + ")" | |
} | |
})), u.a.createElement(h.b, b({ | |
type: "title" | |
}, Object(s.d)(n.dialogTitle)), e.title), u.a.createElement(d.h, Object(s.d)(n.dialogContent), e.children), r.length > 0 && u.a.createElement(d.h, Object(s.d)(n.dialogButtonPane), r))) | |
} | |
g.propTypes = { | |
title: c.a.string, | |
buttons: c.a.array, | |
visible: c.a.bool, | |
headerImage: c.a.string, | |
testId: c.a.string, | |
onRequestClose: c.a.func | |
}, | |
g.defaultProps = { | |
title: "", | |
visible: !1 | |
}; | |
var y = g; | |
t.a = Object(i.e)(Object(i.c)((function({theme: e}) { | |
const t = n("./musketeer/components/UIDialog/styles.common.js").default(e); | |
let r; | |
switch (o.a.OS) { | |
case "android": | |
r = n("./musketeer/components/UIDialog/styles.android.js").default(e); | |
break; | |
case "ios": | |
r = n("./musketeer/components/UIDialog/styles.ios.js").default(e); | |
break; | |
default: | |
r = n("./musketeer/components/UIDialog/styles.web.js").default(e) | |
} | |
return s.a.deepmerge(t, r) | |
} | |
))(y)) | |
}, | |
"./musketeer/components/UIDialog/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIDialog/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function({colors: e, fonts: t, mixins: n, variables: r}) { | |
return { | |
dialogContainer: { | |
display: "flex", | |
flexDirection: "column", | |
overflow: "hidden" | |
}, | |
dialogHeaderImage: { | |
height: 19 * r.basicUnit, | |
marginBottom: r.basicUnit | |
}, | |
dialogTitle: Object.assign({}, n.textEllipsis()), | |
dialogContent: { | |
overflowY: "auto", | |
overflowX: "hidden", | |
maxHeight: "none", | |
maxWidth: "none" | |
}, | |
dialogButtonPane: { | |
display: "flex", | |
justifyContent: "flex-end", | |
flexWrap: "wrap" | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UIDialog/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIDialog/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function({variables: e}) { | |
return { | |
dialogContainer: { | |
marginTop: e.uiTextDialogContainerMarginVertical, | |
marginBottom: e.uiTextDialogContainerMarginVertical, | |
marginLeft: e.uiTextDialogContainerMarginHorizontal, | |
marginRight: e.uiTextDialogContainerMarginHorizontal, | |
maxWidth: e.uiTextDialogContainerMaxWidth | |
}, | |
dialogHeaderImage: { | |
backgroundRepeat: "no-repeat", | |
backgroundPosition: "center", | |
backgroundSize: "contain" | |
}, | |
dialogContent: { | |
marginTop: e.uiTextDialogDescriptionContainerMarginTop, | |
minHeight: e.uiTextDialogDescriptionContainerMinHeight, | |
maxHeight: e.uiTextDialogDescriptionContainerMaxHeight | |
}, | |
dialogButtonPane: { | |
marginTop: e.uiTextDialogButtonBarContainerMarginTop | |
}, | |
dialogButton: { | |
marginLeft: e.uiTextDialogButtonMarginHorizontal, | |
marginRight: e.uiTextDialogButtonMarginHorizontal | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UIHeaderBar/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/react-fela/es/index.js") | |
, i = (n("./musketeer/themes/tolinode/mixins.js"), | |
n("./node_modules/react/index.js")) | |
, o = n.n(i) | |
, s = n("./musketeer/components/UIHeaderBar/node_modules/prop-types/index.js") | |
, a = n.n(s) | |
, u = n("./musketeer/components/UIPrimitives/index.js") | |
, l = n("./musketeer/components/UITools/index.js"); | |
function c() { | |
return (c = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
const d = { | |
PRIMARY: "primary", | |
SECONDARY: "secondary" | |
} | |
, f = { | |
LEFT: "left", | |
CENTER: "center", | |
RIGHT: "right", | |
NONE: "none" | |
}; | |
class h extends o.a.PureComponent { | |
render() { | |
const e = this.props | |
, t = e.styles | |
, n = void 0 === e.children ? [] : e.children instanceof Array ? e.children : [e.children] | |
, r = e.componentLeft || n[0] | |
, i = e.componentCenter || n[1] | |
, s = e.componentRight || n[2]; | |
return o.a.createElement(u.h, c({}, Object(l.d)(t.headerContainer), l.c.getTestAttr(e.testId)), (r || i && s) && o.a.createElement(u.h, c({ | |
key: "left" | |
}, Object(l.d)(t.headerAreaLeft), l.c.getTestAttr(e.testId + "-left")), r), i && o.a.createElement(u.h, c({ | |
key: "center" | |
}, Object(l.d)(t.headerAreaCenter), l.c.getTestAttr(e.testId + "-center")), i), (s || i && r) && o.a.createElement(u.h, c({ | |
key: "right" | |
}, Object(l.d)(t.headerAreaRight)), s)) | |
} | |
} | |
h.propTypes = { | |
border: a.a.bool, | |
children: a.a.any, | |
componentLeft: a.a.oneOfType([a.a.string, a.a.func, a.a.element]), | |
componentCenter: a.a.oneOfType([a.a.string, a.a.func, a.a.element]), | |
componentRight: a.a.oneOfType([a.a.string, a.a.func, a.a.element]), | |
dropShadow: a.a.bool, | |
fixed: a.a.bool, | |
type: a.a.oneOf(Object.values(d)), | |
largeStyle: a.a.oneOf(Object.values(f)), | |
flexBasis: a.a.shape({ | |
left: a.a.number, | |
center: a.a.number, | |
right: a.a.number | |
}) | |
}, | |
h.defaultProps = { | |
border: !1, | |
dropShadow: !1, | |
fixed: !1, | |
type: d.PRIMARY, | |
largeStyle: f.NONE | |
}; | |
var p = h; | |
t.a = Object(r.e)(Object(r.c)(({theme: e, largeStyle: t, flexBasis: n, border: r, dropShadow: i, fixed: o, fadeOut: s, type: a})=>{ | |
const u = e.colors | |
, l = e.variables | |
, c = { | |
alignItems: "center", | |
backgroundColor: u.primary, | |
display: "flex", | |
fontSize: l.fontSizeLarge + "rem", | |
justifyContent: "space-between", | |
height: "fit-content", | |
lineHeight: l.uiHeaderBarHeight + "px", | |
minHeight: 8 * l.basicUnit, | |
paddingLeft: 8, | |
paddingRight: 8, | |
width: "100%", | |
zIndex: l.zIndexToolbarRoot, | |
transition: "top ease-in-out 0.3s", | |
["@media " + l.MQ_0_479]: { | |
lineHeight: l.uiHeaderBarHeightSmall + "px", | |
height: l.uiHeaderBarHeightSmall | |
} | |
}; | |
switch (r && (c.borderBottom = "solid 1px " + u.divider), | |
i && (c.boxShadow = "0 1px 2px " + u.dropShadow), | |
o && (c.left = 0, | |
c.right = 0, | |
c.top = 0, | |
c.position = "absolute"), | |
s && (c.top = -l.uiHeaderBarHeight, | |
c["@media " + l.MQ_0_320] = { | |
top: -l.uiHeaderBarHeightSmall | |
}), | |
a) { | |
case d.SECONDARY: | |
c.backgroundColor = u.primaryAccented | |
} | |
const h = { | |
display: "flex", | |
flex: 1, | |
alignItems: "center", | |
alignSelf: "center", | |
justifyContent: "flex-start" | |
} | |
, p = { | |
display: "flex", | |
flex: 1, | |
alignItems: "center", | |
alignSelf: "center", | |
justifyContent: "center" | |
} | |
, m = { | |
display: "flex", | |
flex: 1, | |
alignItems: "center", | |
alignSelf: "center", | |
justifyContent: "flex-end" | |
}; | |
return t !== f.NONE ? (h.flex = t === f.LEFT ? "1 0" : "0 1", | |
p.flex = t === f.CENTER ? "1 0" : "0 1", | |
m.flex = t === f.RIGHT ? "1 0" : "0 1") : n && (h.flexBasis = n.left + "%", | |
p.flexBasis = n.center + "%", | |
m.flexBasis = n.right + "%"), | |
{ | |
headerContainer: c, | |
headerAreaLeft: h, | |
headerAreaCenter: p, | |
headerAreaRight: m | |
} | |
} | |
)(p)) | |
}, | |
"./musketeer/components/UIIcon/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react/index.js"), o = n.n(i), s = n("./node_modules/react-fela/es/index.js"), a = n("./musketeer/components/UIIcon/node_modules/prop-types/index.js"), u = n.n(a), l = n("./musketeer/components/UIPrimitives/index.js"), c = n("./musketeer/components/UITools/index.js"), d = n.p + "musketeer/components/UIIcon/assets/icons.svg"; | |
function f() { | |
return (f = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function h(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
class p extends o.a.Component { | |
render() { | |
const {styles: e} = this.props; | |
let t = [e.uiIcon, this.props.align ? e[this.props.align] : null, this.props.onClick ? e.clickable : null, this.props.additionalStyles ? this.props.additionalStyles : null, this.props.displayVariant ? e["displayVariant" + c.a.uppercaseFirstLetter(this.props.displayVariant)] : null, this.props.active ? e.active : null, this.props.spinning ? e.spinning : null, this.props.disabled ? e.disabled : null, this.props.className ? this.props.className : null]; | |
return o.a.createElement(l.b, f({ | |
ref: this.props.innerRef | |
}, c.b.getStylesForPlatform(t), { | |
onClick: this.props.disabled ? null : this.props.onClick | |
}, c.c.getTestAttr(this.props.testId)), h(l.g, { | |
xlinkHref: d + "#icon-" + this.props.icon | |
})) | |
} | |
} | |
p.propTypes = { | |
active: u.a.bool, | |
spinning: u.a.bool, | |
additionalStyles: u.a.oneOfType([u.a.array, u.a.string]), | |
align: u.a.oneOf(["left", "right"]), | |
disabled: u.a.bool, | |
displayVariant: u.a.oneOf(Object.values({ | |
BUTTON: "button", | |
BUTTONNOPADDING: "buttonNoPadding", | |
NAVICON: "navIcon", | |
NOPADDING: "noPadding" | |
})), | |
icon: u.a.string.isRequired, | |
onClick: u.a.func, | |
testId: u.a.string | |
}; | |
var m = p; | |
function b() { | |
return (b = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
const g = Object(s.e)(Object(s.c)((function(e) { | |
const t = e.theme | |
, n = t.colors | |
, r = t.variables; | |
return { | |
uiIcon: { | |
fill: n.primaryIcon, | |
height: r.uiIconHeight, | |
marginLeft: r.uiIconMarginLeftRight, | |
marginRight: r.uiIconMarginLeftRight, | |
paddingBottom: 1.5 * r.basicUnit, | |
paddingLeft: 1.5 * r.basicUnit, | |
paddingRight: 1.5 * r.basicUnit, | |
paddingTop: 1.5 * r.basicUnit, | |
width: r.uiIconWidth, | |
":hover": { | |
fill: "currentColor" | |
} | |
}, | |
displayVariantButton: { | |
fill: "currentColor", | |
height: 3 * r.basicUnit, | |
marginLeft: 0, | |
marginRight: 0, | |
paddingBottom: r.basicUnit / 4, | |
paddingLeft: "0 !important", | |
paddingRight: "0 !important", | |
paddingTop: r.basicUnit / 1.3, | |
width: 3 * r.basicUnit | |
}, | |
displayVariantButtonNoPadding: { | |
fill: "currentColor", | |
height: 3 * r.basicUnit, | |
marginLeft: 0, | |
marginRight: 0, | |
paddingBottom: 0, | |
paddingLeft: "0 !important", | |
paddingRight: "0 !important", | |
paddingTop: 0, | |
width: 3 * r.basicUnit | |
}, | |
displayVariantNavIcon: { | |
border: "1px solid " + n.divider, | |
borderRadius: "50%", | |
boxShadow: r.dropShadowNavTappable, | |
height: r.uiNavTappableSize, | |
left: "50%", | |
position: "absolute", | |
top: "50%", | |
transform: "translate(-50%, -50%)", | |
alignSelf: "center", | |
width: r.uiNavTappableSize | |
}, | |
displayVariantNoPadding: { | |
paddingBottom: 0, | |
paddingLeft: 0, | |
paddingRight: 0, | |
paddingTop: 0, | |
height: r.uiIconHeight - 3 * r.basicUnit, | |
width: r.uiIconHeight - 3 * r.basicUnit | |
}, | |
left: { | |
transformOrigin: "18px 24px", | |
paddingBottom: r.uiIconPadding, | |
paddingLeft: 0, | |
paddingRight: r.uiIconPadding, | |
paddingTop: r.uiIconPadding | |
}, | |
right: { | |
transformOrigin: "30px 24px", | |
paddingBottom: r.uiIconPadding, | |
paddingLeft: r.uiIconPadding, | |
paddingRight: 0, | |
paddingTop: r.uiIconPadding | |
}, | |
active: { | |
borderColor: n.accent + " !important", | |
fill: n.accent + " !important", | |
":hover": { | |
borderColor: n.accent + " !important", | |
fill: n.accent + " !important" | |
} | |
}, | |
spinning: { | |
animation: "rotate360 1.5s linear infinite" | |
}, | |
clickable: { | |
":hover": { | |
cursor: "pointer", | |
fill: n.accent | |
} | |
}, | |
disabled: { | |
borderColor: n.transparent, | |
fill: n.disabled, | |
":hover": { | |
cursor: "default", | |
borderColor: n.transparent, | |
fill: n.disabled | |
} | |
} | |
} | |
} | |
))(m)); | |
t.a = o.a.forwardRef((e,t)=>o.a.createElement(g, b({ | |
innerRef: t | |
}, e))) | |
}, | |
"./musketeer/components/UIImage/index.ts": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./node_modules/react/index.js"), s = n.n(o), a = n("./musketeer/components/UIPrimitives/index.js"), u = n("./musketeer/components/UITools/index.js"); | |
function l(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function c() { | |
return (c = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function d(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
class f extends s.a.Component { | |
constructor(e) { | |
super(e), | |
d(this, "getDefaultDimensionStyle", ()=>({ | |
width: void 0, | |
height: void 0 | |
})), | |
d(this, "getImageDimensionStyleByResizeMode", (e,t,n,r,i)=>{ | |
switch (e) { | |
case "cover": | |
{ | |
let e = n | |
, o = Math.round(n * r / i); | |
return e < t && (o = t, | |
e = Math.round(t * i / r)), | |
{ | |
imageWidth: o, | |
imageHeight: e | |
} | |
} | |
case "contain": | |
{ | |
let e = n | |
, o = Math.round(n * r / i); | |
return o > t && (o = t, | |
e = Math.round(t * i / r)), | |
{ | |
imageWidth: o, | |
imageHeight: e | |
} | |
} | |
case "stretch": | |
default: | |
return { | |
imageWidth: t, | |
imageHeight: n | |
} | |
} | |
} | |
), | |
d(this, "onImgLoad", ({target: e})=>{ | |
this.updateComponentDimensions(e.offsetWidth, e.offsetHeight) | |
} | |
), | |
this.state = { | |
dimensions: {}, | |
opacityLayerStyle: {}, | |
opacityLayerPotionerStyle: {} | |
} | |
} | |
componentDidMount() { | |
this.setState({ | |
dimensions: this.getDefaultDimensionStyle(), | |
opacityLayerStyle: this.getDefaultDimensionStyle(), | |
opacityLayerPotionerStyle: this.getDefaultDimensionStyle() | |
}) | |
} | |
getAppliedStyles() { | |
const {styles: e, additionalStyles: t} = this.props | |
, {imageContainer: n, opacityLayerPositioner: r, opacityLayer: i} = e; | |
return { | |
imageContainer: n, | |
opacityLayer: i, | |
opacityLayerPositioner: r, | |
additionalStyles: t | |
} | |
} | |
updateNativeImageSize() { | |
const {src: e} = this.props | |
} | |
updateComponentDimensions(e, t) { | |
const {resizeMode: n, opacity: r, containerWidth: i, containerHeight: o} = this.props; | |
if (!i || !o) | |
return; | |
const {imageWidth: s, imageHeight: a} = this.getImageDimensionStyleByResizeMode(n, i, o, e, t); | |
let u = this.getDefaultDimensionStyle() | |
, l = this.getDefaultDimensionStyle(); | |
r && r <= 1 && r >= 0 && (u = { | |
width: s, | |
height: (1 - r) * a | |
}, | |
l = { | |
width: s, | |
height: a | |
}), | |
this.setState({ | |
dimensions: { | |
width: s, | |
height: a | |
}, | |
opacityLayerStyle: u, | |
opacityLayerPotionerStyle: l | |
}) | |
} | |
renderNative() { | |
const {src: e, opacity: t} = this.props | |
, n = this.getAppliedStyles(); | |
return s.a.createElement(a.h, u.b.getStylesForPlatform([n.additionalStyles, n.imageContainer]), s.a.createElement(a.a, c({ | |
source: { | |
uri: e | |
} | |
}, u.b.getStylesForPlatform([{ | |
width: this.state.dimensions.width, | |
height: this.state.dimensions.height | |
}]))), t && t <= 1 && t >= 0 && s.a.createElement(a.h, u.b.getStylesForPlatform([{ | |
width: this.state.opacityLayerPotionerStyle.width, | |
height: this.state.opacityLayerPotionerStyle.height | |
}, n.opacityLayerPositioner]), s.a.createElement(a.h, u.b.getStylesForPlatform([{ | |
width: this.state.opacityLayerStyle.width, | |
height: this.state.opacityLayerStyle.height | |
}, n.opacityLayer])))) | |
} | |
renderWeb() { | |
const {src: e, opacity: t} = this.props | |
, n = this.getAppliedStyles(); | |
return s.a.createElement(a.h, u.b.getStylesForPlatform([n.additionalStyles, n.imageContainer]), t && t <= 1 && t >= 0 && s.a.createElement(a.h, c({}, u.b.getStylesForPlatform(n.opacityLayerPositioner), { | |
style: { | |
width: this.state.opacityLayerPotionerStyle.width, | |
height: this.state.opacityLayerPotionerStyle.height | |
} | |
}), s.a.createElement(a.h, c({}, u.b.getStylesForPlatform(n.opacityLayer), { | |
style: { | |
width: this.state.opacityLayerStyle.width, | |
height: this.state.opacityLayerStyle.height | |
} | |
}))), l(a.a, { | |
src: e, | |
onLoad: e=>this.onImgLoad(e), | |
style: { | |
width: this.state.dimensions.width, | |
height: this.state.dimensions.height | |
} | |
})) | |
} | |
render() { | |
return this.renderWeb() | |
} | |
} | |
function h(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
const p = { | |
colors: new class { | |
constructor() { | |
h(this, "transparent", "rgba(255, 255, 255, 0)") | |
} | |
} | |
, | |
variables: new class { | |
constructor() { | |
h(this, "basicUnit", 8), | |
h(this, "uiImageWidth", "auto"), | |
h(this, "uiImageHeight", "auto"), | |
h(this, "uiImageOpacity", 1) | |
} | |
} | |
}; | |
function m(e) { | |
const t = function(e) { | |
const {variables: t} = p; | |
return { | |
imageContainer: { | |
display: "flex", | |
alignItems: "center", | |
justifyContent: "center", | |
overflow: "hidden", | |
width: t.uiImageWidth, | |
height: t.uiImageHeight | |
}, | |
opacityLayerPositioner: { | |
position: "absolute" | |
}, | |
opacityLayer: { | |
position: "absolute", | |
opacity: t.uiImageOpacity | |
} | |
} | |
}() | |
, n = { | |
imageContainer: { | |
position: "relative" | |
}, | |
opacityLayer: { | |
background: "white" | |
} | |
}; | |
return u.a.deepmerge(t, n) | |
} | |
var b = n("./musketeer/themes/theme-base/index.ts"); | |
t.a = Object(b.a)(Object(i.c)(({theme: e})=>m())(f), p) | |
}, | |
"./musketeer/components/UILabel/index.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return b | |
} | |
)); | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./node_modules/react-redux/es/index.js"), s = n("./musketeer/components/UIPrimitives/Platform.js"), a = n("./musketeer/components/UITools/index.js"), u = n("./node_modules/react/index.js"), l = n.n(u), c = n("./node_modules/prop-types/index.js"), d = n.n(c), f = n("./musketeer/components/UIPrimitives/index.js"); | |
function h() { | |
return (h = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function p(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function m(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
const b = { | |
HEADER1: "header1", | |
HEADER2: "header2", | |
TITLE: "title", | |
BODY: "body", | |
BODYBOLD: "bodyBold", | |
BODYLARGE: "bodyLarge", | |
SMALL: "small", | |
SMALLBOLD: "smallBold", | |
SMALLDISABLED: "smallDisabled", | |
CAPTION: "caption", | |
CAPTIONBOLD: "captionBold", | |
DISABLED: "disabled" | |
}; | |
class g extends l.a.Component { | |
constructor(...e) { | |
super(...e), | |
m(this, "render", "android" === s.a.OS ? this.renderAndroid : "ios" === s.a.OS ? this.renderIOS : this.renderWeb) | |
} | |
renderAndroid() { | |
return p(f.c, {}) | |
} | |
renderIOS() { | |
return p(f.c, {}) | |
} | |
renderWeb() { | |
const {styles: e} = this.props | |
, t = [this.props.fontSettings && "rx-bg-night" === this.props.fontSettings.backgroundMode ? e.nightmode : null, this.props.className ? this.props.className : null, this.props.selectable ? e.selectable : null, e[this.props.type], 1 === this.props.numberOfLines && e.singleLine, this.props.additionalStyles] | |
, n = "object" != typeof this.props.additionalStyles || Array.isArray(this.props.additionalStyles) ? this.props.style : { | |
...this.props.style, | |
...this.props.additionalStyles | |
}; | |
return l.a.createElement(f.c, h({}, Object(a.d)(t), a.c.getTestAttr(this.props.testId), { | |
style: n, | |
onClick: this.props.onClick | |
}), this.props.children) | |
} | |
} | |
m(g, "propTypes", { | |
additionalStyles: d.a.oneOfType([d.a.array, d.a.object, d.a.string]), | |
numberOfLines: d.a.number, | |
selectable: d.a.bool, | |
testId: d.a.string, | |
type: d.a.oneOf(Object.values(b)), | |
onClick: d.a.func | |
}), | |
m(g, "defaultProps", { | |
selectable: !1, | |
type: b.BODY | |
}); | |
var y = g; | |
const v = Object(i.e)(Object(i.c)((function(e) { | |
const t = e.theme | |
, r = n("./musketeer/components/UILabel/styles.common.js").default(t); | |
let i; | |
switch (s.a.OS) { | |
case "android": | |
i = n("./musketeer/components/UILabel/styles.android.js").default(t); | |
break; | |
case "ios": | |
i = n("./musketeer/components/UILabel/styles.ios.js").default(t); | |
break; | |
default: | |
i = n("./musketeer/components/UILabel/styles.web.js").default(t) | |
} | |
return a.a.deepmerge(r, i) | |
} | |
))(y)); | |
t.b = Object(o.b)((function(e) { | |
return { | |
fontSettings: e.reader && e.reader.fontSettings | |
} | |
} | |
))(v) | |
}, | |
"./musketeer/components/UILabel/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UILabel/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UILabel/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UILabel/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
n("./musketeer/themes/tolinode/colors.js"); | |
t.default = function(e) { | |
const t = e.mixins | |
, n = e.variables | |
, r = e.fonts | |
, i = e.colors; | |
return { | |
initial: Object.assign(t.userSelect(!1), { | |
borderWidth: 0, | |
color: "inherit", | |
display: "inline", | |
lineHeight: n.lineHeight, | |
margin: 0, | |
padding: 0, | |
textDecoration: "none", | |
whiteSpace: "pre-wrap", | |
wordWrap: "break-word" | |
}), | |
header1: r.header1(), | |
header2: r.header2(), | |
title: Object.assign(r.title(), { | |
lineHeight: 1.2 | |
}), | |
body: r.body(), | |
bodyBold: r.bodyBold(), | |
bodyLarge: r.bodyLarge(), | |
small: r.small(), | |
smallBold: r.smallBold(), | |
smallDisabled: r.smallDisabled(), | |
caption: r.caption(), | |
captionBold: r.captionBold(), | |
disabled: r.disabled(), | |
selectable: t.userSelect(!0), | |
singleLine: Object.assign(t.textEllipsis, { | |
maxWidth: "100%" | |
}), | |
nightmode: { | |
color: i.black | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UIList/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./musketeer/components/UIList/node_modules/react-fela/es/index.js") | |
, i = n("./node_modules/react/index.js") | |
, o = n.n(i) | |
, s = n("./node_modules/prop-types/index.js") | |
, a = n.n(s) | |
, u = n("./musketeer/components/UITools/index.js"); | |
n("./node_modules/util/util.js"); | |
function l() { | |
return (l = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
const c = { | |
BOTH: "both", | |
BOTTOM: "bottom", | |
TOP: "top" | |
} | |
, d = { | |
BOTH: "both", | |
BOTTOM: "bottom", | |
TOP: "top" | |
} | |
, f = { | |
SMALL: "small", | |
LARGE: "large" | |
}; | |
class h extends o.a.Component { | |
render() { | |
const {styles: e} = this.props; | |
let t = [this.props.borderStyle === c.BOTH ? [e.borderBottom, e.borderTop] : null, this.props.borderStyle === c.BOTTOM ? e.borderBottom : null, this.props.borderStyle === c.TOP ? e.borderTop : null]; | |
return this.props.paddingStyle && (this.props.paddingSize ? this.props.paddingSize === f.SMALL ? t.push(this.props.paddingStyle === d.BOTH || this.props.paddingStyle === d.TOP ? e.paddingTopSmall : null, this.props.paddingStyle === d.BOTH || this.props.paddingStyle === d.BOTTOM ? e.paddingBottomSmall : null) : this.props.paddingSize === f.LARGE && t.push(this.props.paddingStyle === d.BOTH || this.props.paddingStyle === d.TOP ? e.paddingTopLarge : null, this.props.paddingStyle === d.BOTH || this.props.paddingStyle === d.BOTTOM ? e.paddingBottomLarge : null) : t.push(this.props.paddingStyle === d.BOTH || this.props.paddingStyle === d.TOP ? e.paddingTopDefault : null, this.props.paddingStyle === d.BOTH || this.props.paddingStyle === d.BOTTOM ? e.paddingBottomDefault : null)), | |
this.props.fillHeight && t.push(e.fillHeight), | |
"ordered" === this.props.type ? o.a.createElement("ol", l({}, u.b.getStylesForPlatform(t), u.c.getTestAttr(this.props.testId)), this.props.children) : o.a.createElement("ul", l({}, u.b.getStylesForPlatform(t), u.c.getTestAttr(this.props.testId)), this.props.children) | |
} | |
} | |
h.propTypes = { | |
borderStyle: a.a.oneOf(Object.values(c)), | |
children: a.a.any, | |
paddingSize: a.a.oneOf(Object.values(f)), | |
paddingStyle: a.a.oneOf(Object.values(d)), | |
type: a.a.oneOf(["ordered", "unordered"]), | |
fillHeight: a.a.bool | |
}, | |
h.defaultProps = { | |
type: "unordered", | |
fillHeight: !1 | |
}; | |
var p = h; | |
t.a = Object(r.b)(Object(r.a)((function(e) { | |
const t = e.theme | |
, n = t.colors | |
, r = t.variables; | |
return { | |
borderBottom: { | |
borderBottom: "1px solid " + n.divider | |
}, | |
borderTop: { | |
borderTop: "1px solid " + n.divider | |
}, | |
paddingBottomDefault: { | |
paddingBottom: 1.5 * r.basicUnit | |
}, | |
paddingTopDefault: { | |
paddingTop: 1.5 * r.basicUnit | |
}, | |
paddingBottomSmall: { | |
paddingBottom: r.basicUnit | |
}, | |
paddingTopSmall: { | |
paddingTop: r.basicUnit | |
}, | |
paddingBottomLarge: { | |
paddingBottom: 3 * r.basicUnit | |
}, | |
paddingTopLarge: { | |
paddingTop: 3 * r.basicUnit | |
}, | |
fillHeight: { | |
overflowY: "hidden", | |
height: "100%" | |
} | |
} | |
} | |
))(p)) | |
}, | |
"./musketeer/components/UIListItem/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./musketeer/components/UIListItem/node_modules/react-fela/es/index.js"), o = n("./node_modules/react/index.js"), s = n.n(o), a = n("./node_modules/prop-types/index.js"), u = n.n(a), l = n("./musketeer/components/UIPrimitives/index.js"), c = n("./musketeer/components/UIPrimitives/Platform.js"), d = n("./musketeer/components/UITools/index.js"), f = n("./musketeer/components/UIIcon/index.js"); | |
function h() { | |
return (h = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function p(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
const m = { | |
BOTH: "both", | |
BOTTOM: "bottom", | |
TOP: "top" | |
} | |
, b = { | |
SHORT: "short" | |
} | |
, g = { | |
SMALL: "small", | |
LARGE: "large", | |
EXTRA: "xlarge", | |
FITCONTENT: "fitcontent" | |
} | |
, y = { | |
LEFT: "left" | |
} | |
, v = { | |
SMALL: "small", | |
NONE: "none" | |
} | |
, _ = { | |
RIGHT: "right" | |
} | |
, w = { | |
TOP: "top", | |
BOTTOM: "bottom" | |
}; | |
function S(e) { | |
const {styles: t} = e; | |
return "android" === c.a.OS || "ios" === c.a.OS ? p(l.h, {}) : s.a.createElement("li", h({}, d.b.getStylesForPlatform(t.listItem), { | |
onClick: e.disabled ? void 0 : e.onClick | |
}), s.a.createElement(l.h, h({}, d.b.getStylesForPlatform(t.listItemContent), d.c.getTestAttr(e.testId)), e.children), e.icon && s.a.createElement(l.h, d.b.getStylesForPlatform(t.listItemIcon), p(f.a, { | |
disabled: e.disabled, | |
icon: e.icon, | |
align: e.iconAlign, | |
active: e.active | |
}))) | |
} | |
S.propTypes = { | |
active: u.a.bool, | |
borderStyle: u.a.oneOf(Object.values(m)), | |
borderStyleVariant: u.a.oneOf(Object.values(b)), | |
children: u.a.any, | |
disabled: u.a.bool, | |
disableHover: u.a.bool, | |
heightStyle: u.a.oneOf(Object.values(g)), | |
icon: u.a.string, | |
iconAlign: u.a.oneOf(Object.values({ | |
LEFT: "left", | |
RIGHT: "right" | |
})), | |
iconPos: u.a.oneOf(Object.values(y)), | |
onClick: u.a.func, | |
paddingStyle: u.a.oneOf(Object.values(v)), | |
paddingStyleVariant: u.a.oneOf(Object.values(_)), | |
testId: u.a.string, | |
verticalAlign: u.a.oneOf(Object.values(w)) | |
}, | |
S.defaultProps = {}; | |
var E = S; | |
t.a = Object(i.b)(Object(i.a)((function({theme: e, borderStyle: t, borderStyleVariant: n, paddingStyle: r, paddingStyleVariant: i, heightStyle: o, icon: s, iconPos: a, verticalAlign: u, active: l, disableHover: c, disabled: d}) { | |
const f = e.colors | |
, h = e.variables | |
, p = e.mixins.hasTouch(); | |
let S = { | |
backgroundColor: f.transparent, | |
display: "flex", | |
fontSize: h.fontSizeLarge + "rem", | |
height: 6 * h.basicUnit, | |
lineHeight: h.lineHeight, | |
paddingBottom: h.basicUnit, | |
paddingLeft: 2 * h.basicUnit, | |
paddingRight: 2 * h.basicUnit, | |
paddingTop: h.basicUnit | |
} | |
, E = { | |
display: "flex", | |
flex: 1, | |
flexDirection: "column", | |
justifyContent: "center" | |
} | |
, j = { | |
height: 6 * h.basicUnit, | |
marginTop: -h.basicUnit | |
}; | |
switch (p || (S[":hover"] = { | |
backgroundColor: f.accent12, | |
cursor: "pointer" | |
}), | |
l && (S.color = f.accent, | |
S.fontFamily = "ui-bold"), | |
c && (S[":hover"] = { | |
backgroundColor: "inherit", | |
cursor: "initial" | |
}, | |
S[":active"] = { | |
color: "inherit", | |
fontFamily: "inherit" | |
}), | |
d && (S.color = f.disabled), | |
t) { | |
case m.BOTH: | |
S.borderBottom = "1px solid " + f.divider, | |
S.borderTop = "1px solid " + f.divider; | |
break; | |
case m.BOTTOM: | |
S.borderBottom = "1px solid " + f.divider; | |
break; | |
case m.TOP: | |
S.borderTop = "1px solid " + f.divider | |
} | |
switch (n) { | |
case b.SHORT: | |
S.marginLeft = 2 * h.basicUnit, | |
S.marginRight = 2 * h.basicUnit | |
} | |
switch (r) { | |
case v.SMALL: | |
S.paddingBottom = h.basicUnit / 2, | |
S.paddingLeft = h.basicUnit, | |
S.paddingRight = h.basicUnit, | |
S.paddingTop = h.basicUnit / 2, | |
j.marginTop = -h.basicUnit / 2; | |
break; | |
case v.NONE: | |
S.paddingBottom = "0 !important", | |
S.paddingLeft = "0 !important", | |
S.paddingRight = "0 !important", | |
S.paddingTop = "0 !important", | |
j.marginTop = 0 | |
} | |
switch (i) { | |
case _.RIGHT: | |
S.paddingBottom = "0 !important", | |
S.paddingLeft = "0 !important", | |
S.paddingRight = 10 * h.basicUnit, | |
S.paddingTop = "0 !important", | |
j.marginTop = 0 | |
} | |
switch (o) { | |
case g.SMALL: | |
S.height = .45 * h.basicUnit + "rem !important", | |
j.marginTop = -1.5 * h.basicUnit; | |
break; | |
case g.LARGE: | |
S.height = .8 * h.basicUnit + "rem !important"; | |
break; | |
case g.EXTRA: | |
S.height = h.basicUnit + "rem !important"; | |
break; | |
case g.FITCONTENT: | |
S.height = ["-moz-fit-content !important", "fit-content !important"] | |
} | |
if (s) | |
switch (a) { | |
case y.LEFT: | |
S.flexDirection = "row-reverse" | |
} | |
switch (u) { | |
case w.TOP: | |
E.justifyContent = "flex-start"; | |
break; | |
case w.BOTTOM: | |
E.justifyContent = "flex-end" | |
} | |
return { | |
listItem: S, | |
listItemContent: E, | |
listItemIcon: j | |
} | |
} | |
))(E)) | |
}, | |
"./musketeer/components/UIModalBlocker/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./musketeer/components/UIModalBlocker/node_modules/react-fela/es/index.js"), o = n("./musketeer/components/UIPrimitives/Platform.js"), s = n("./musketeer/components/UITools/index.js"), a = n("./node_modules/react/index.js"), u = n.n(a), l = n("./node_modules/prop-types/index.js"), c = n.n(l), d = n("./musketeer/components/UIPrimitives/index.js"); | |
function f() { | |
return (f = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function h(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function p(e) { | |
const {styles: t} = e | |
, n = Object(a.useRef)(null) | |
, [r,i] = Object(a.useState)(e.visible) | |
, l = t=>{ | |
e.removeOnClick && i(!1), | |
e.onClick(t) | |
} | |
, c = e=>{ | |
e.stopPropagation(), | |
e.preventDefault() | |
} | |
; | |
Object(a.useEffect)(()=>(n.current && n.current.addEventListener("contextmenu", c, !1), | |
()=>{ | |
n.current && n.current.removeEventListener("contextmenu", c, !1) | |
} | |
), []); | |
return "android" === o.a.OS || "ios" === o.a.OS ? h(d.h, {}) : (()=>{ | |
const i = { | |
appliedStyles: [t.modalBlocker, e.transparent ? t.transparent : null, r ? t.visible : null] | |
}; | |
let o = {}; | |
e.position && (o.left = e.position.left + "px", | |
o.top = e.position.top + "px"), | |
e.dimensions && (o.height = e.dimensions.height + "px", | |
o.width = e.dimensions.width + "px"); | |
let a = void 0 === e.testId ? "UIModalBlocker" : e.testId; | |
return u.a.createElement(d.h, f({ | |
ref: n | |
}, s.b.getStylesForPlatform(i.appliedStyles), { | |
style: o, | |
onClick: l, | |
onTouchStart: l | |
}, s.c.getTestAttr(a))) | |
} | |
)() | |
} | |
p.propTypes = { | |
onClick: c.a.func, | |
removeOnClick: c.a.bool, | |
transparent: c.a.bool, | |
visible: c.a.bool, | |
testId: c.a.string, | |
position: c.a.shape({ | |
left: c.a.number, | |
top: c.a.number | |
}), | |
dimensions: c.a.shape({ | |
height: c.a.number, | |
width: c.a.number | |
}) | |
}, | |
p.defaultProps = { | |
onClick: Function.prototype, | |
removeOnClick: !0, | |
transparent: !1, | |
visible: !1 | |
}; | |
var m = p; | |
t.a = Object(i.b)(Object(i.a)((function(e) { | |
const t = e.theme | |
, r = n("./musketeer/components/UIModalBlocker/styles.common.js").default(t); | |
let i; | |
switch (o.a.OS) { | |
case "android": | |
i = n("./musketeer/components/UIModalBlocker/styles.android.js").default(t); | |
break; | |
case "ios": | |
i = n("./musketeer/components/UIModalBlocker/styles.ios.js").default(t); | |
break; | |
default: | |
i = n("./musketeer/components/UIModalBlocker/styles.web.js").default(t) | |
} | |
return s.a.deepmerge(r, i) | |
} | |
))(m)) | |
}, | |
"./musketeer/components/UIModalBlocker/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIModalBlocker/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
var r = n("./node_modules/color-js/color.js") | |
, i = n.n(r); | |
t.default = function(e) { | |
const t = e.variables | |
, n = e.colors | |
, r = e.mixins; | |
return { | |
modalBlocker: Object.assign(r.fullWidthHeight(), { | |
backgroundColor: i()(n.black).setAlpha(.2).toCSS(), | |
bottom: 0, | |
display: "none", | |
left: 0, | |
opacity: 0, | |
position: "fixed", | |
right: 0, | |
top: 0, | |
transition: "opacity " + t.animationDuration + " " + t.animationEasing, | |
zIndex: t.zIndexModalBlocker | |
}), | |
visible: { | |
display: "block", | |
opacity: 1 | |
}, | |
transparent: { | |
backgroundColor: n.transparent + "!important" | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UIModalBlocker/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIModalBlocker/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIPopUp/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react/index.js"), o = n.n(i), s = n("./musketeer/components/UIPopUp/node_modules/react-fela/es/index.js"), a = n("./musketeer/themes/tolinode/mixins.js"), u = n("./node_modules/prop-types/index.js"), l = n.n(u), c = n("./musketeer/components/UIPrimitives/index.js"), d = n("./musketeer/components/UIPrimitives/Platform.js"), f = n("./musketeer/components/UITools/index.js"), h = n("./musketeer/components/UIModalBlocker/index.js"); | |
function p() { | |
return (p = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function m(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function b(e) { | |
const {position: t, styles: n} = e | |
, r = Object(i.useRef)(null) | |
, s = e=>{ | |
e.stopPropagation(), | |
e.preventDefault() | |
} | |
; | |
Object(i.useEffect)(()=>(r.current && r.current.addEventListener("contextmenu", s, !1), | |
()=>{ | |
r.current && r.current.removeEventListener("contextmenu", s, !1) | |
} | |
), []); | |
return "android" === d.a.OS || "ios" === d.a.OS ? m(c.h, {}) : (()=>{ | |
const i = [n.popup, e.showPadding ? e.paddingStyle ? n["padding" + f.a.uppercaseFirstLetter(e.paddingStyle)] : n.padding : null, t && "string" == typeof t ? t : null, e.dimensions ? e.dimensions : null, e.preventScrolling ? n.noScrolling : null] | |
, s = "object" == typeof t ? { | |
...e.style, | |
...t | |
} : e.style; | |
return e.visible && m(o.a.Fragment, {}, void 0, !e.modalDisabled && m(h.a, { | |
removeOnClick: !1, | |
transparent: e.modalBlockerIsTransparent, | |
visible: !0, | |
onClick: e.onRequestClose | |
}), o.a.createElement(c.h, p({ | |
key: "uipopup-fragment", | |
ref: r | |
}, f.b.getStylesForPlatform(i), { | |
style: s | |
}, f.c.getTestAttr(e.testId)), e.children)) | |
} | |
)() | |
} | |
b.propTypes = { | |
dimensions: l.a.string, | |
modalDisabled: l.a.bool, | |
modalBlockerIsTransparent: l.a.bool, | |
onRequestClose: l.a.func, | |
position: l.a.oneOfType([l.a.array, l.a.object, l.a.string]), | |
preventScrolling: l.a.bool, | |
showPadding: l.a.bool, | |
visible: l.a.bool.isRequired | |
}, | |
b.defaultProps = { | |
modalBlockerIsTransparent: !1, | |
modalDisabled: !1, | |
showPadding: !0, | |
position: { | |
left: "50%", | |
top: "50%", | |
transform: "translate(-50%, -50%)" | |
}, | |
visible: !1 | |
}; | |
var g = b; | |
function y() { | |
return (y = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
const v = Object(s.b)(Object(s.a)((function(e) { | |
const t = e.theme | |
, n = t.variables; | |
return { | |
popup: Object.assign({ | |
backgroundColor: t.colors.primary, | |
border: "1px solid " + t.colors.divider, | |
borderRadius: t.variables.basicUnit, | |
boxShadow: t.variables.dropShadow, | |
maxHeight: "80%", | |
maxWidth: "70%", | |
minWidth: 37 * n.basicUnit, | |
overflowY: "auto", | |
position: "fixed", | |
width: "intrinsic", | |
zIndex: t.variables.zIndexModalBlockerContent, | |
["@media " + t.variables.MQ_320_479]: { | |
maxHeight: "90%", | |
maxWidth: "90%" | |
} | |
}, a.a.scrollable()), | |
padding: { | |
padding: n.basicUnit | |
}, | |
paddingLarge: { | |
padding: 2 * n.basicUnit | |
}, | |
noScrolling: { | |
overflow: "hidden" | |
} | |
} | |
} | |
))(g)); | |
t.a = o.a.forwardRef((e,t)=>o.a.createElement(v, y({ | |
innerRef: t | |
}, e))) | |
}, | |
"./musketeer/components/UIPrimitives/Platform.js": function(e, t, n) { | |
"use strict"; | |
const r = { | |
OS: "web", | |
select: ({obj: e})=>"web"in obj ? obj.web : obj.default | |
}; | |
t.a = r | |
}, | |
"./musketeer/components/UIPrimitives/index.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return u | |
} | |
)), | |
n.d(t, "f", (function() { | |
return l | |
} | |
)), | |
n.d(t, "h", (function() { | |
return c | |
} | |
)), | |
n.d(t, "c", (function() { | |
return d | |
} | |
)), | |
n.d(t, "d", (function() { | |
return f | |
} | |
)), | |
n.d(t, "b", (function() { | |
return h | |
} | |
)), | |
n.d(t, "g", (function() { | |
return p | |
} | |
)), | |
n.d(t, "e", (function() { | |
return m | |
} | |
)), | |
n.d(t, "i", (function() { | |
return a | |
} | |
)); | |
var r = n("./node_modules/fela/es/index.js") | |
, i = n("./node_modules/react-fela/es/index.js") | |
, o = n("./musketeer/modules/_utils/typeof.ts") | |
, s = n("./musketeer/modules/_utils/filterOutNullValues.ts"); | |
const a = (e,t,n)=>{ | |
const a = Object(o.a)(e) ? Object(s.a)(e) : Object(s.a)([e]) | |
, u = Object(r.a)(...a); | |
return Object(i.d)(u, t || c, n || []) | |
} | |
, u = "img" | |
, l = "div" | |
, c = "div" | |
, d = "span" | |
, f = "textarea" | |
, h = "svg" | |
, p = "use" | |
, m = "input" | |
}, | |
"./musketeer/components/UIProgressSpinner/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./musketeer/components/UIProgressSpinner/node_modules/react-fela/es/index.js") | |
, i = n("./musketeer/components/UIPrimitives/Platform.js") | |
, o = n("./musketeer/components/UITools/index.js") | |
, s = n("./node_modules/react/index.js") | |
, a = n.n(s) | |
, u = n("./node_modules/prop-types/index.js") | |
, l = n.n(u) | |
, c = n("./musketeer/components/UIPrimitives/index.js") | |
, d = n("./musketeer/components/UIIcon/index.js"); | |
function f() { | |
return (f = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function h(e) { | |
const {additionalStyles: t, className: n, onClick: r, progress: i, style: s, styles: u, testId: l} = e | |
, h = i > 0 | |
, p = Boolean(r) | |
, m = { | |
transform: `rotate(${i >= 50 ? 3.6 * i : 180}deg)` | |
} | |
, b = { | |
transform: `rotate(${i < 50 ? 180 + 3.6 * i : 180}deg)`, | |
visibility: i >= 50 ? "hidden" : "visible" | |
} | |
, g = [u.progressSpinnerContainer, n, "string" == typeof t && t]; | |
return a.a.createElement(c.h, f({}, o.c.getTestAttr(l), Object(o.d)(g), { | |
style: "object" == typeof t ? { | |
...s, | |
...t | |
} : s, | |
onClick: p ? r : null | |
}), a.a.createElement(c.h, Object(o.d)(u.progressSpinnerLeftContainer), a.a.createElement(c.h, f({}, Object(o.d)(u.progressSpinnerLeftProgressCircle), { | |
style: m | |
}))), a.a.createElement(c.h, Object(o.d)(u.progressSpinnerRightContainer), a.a.createElement(c.h, f({}, Object(o.d)(u.progressSpinnerRightProgressCircle), { | |
style: b | |
}))), a.a.createElement(c.h, Object(o.d)(u.progressSpinnerInnerCircle), a.a.createElement(d.a, f({ | |
icon: p && h ? "pause" : "arrow-download" | |
}, Object(o.d)(p && h ? u.iconStop : u.iconArrow))))) | |
} | |
h.propTypes = { | |
progress: l.a.number, | |
onClick: l.a.func, | |
additionalStyles: l.a.oneOfType([l.a.array, l.a.object, l.a.string]), | |
testId: l.a.string | |
}, | |
h.defaultProps = { | |
progress: 0 | |
}; | |
var p = h; | |
t.a = Object(r.b)(Object(r.a)((function(e) { | |
const t = e.theme | |
, r = n("./musketeer/components/UIProgressSpinner/styles.common.js").default(t); | |
let s; | |
switch (i.a.OS) { | |
case "android": | |
s = n("./musketeer/components/UIProgressSpinner/styles.android.js").default(t); | |
break; | |
case "ios": | |
s = n("./musketeer/components/UIProgressSpinner/styles.ios.js").default(t); | |
break; | |
default: | |
s = n("./musketeer/components/UIProgressSpinner/styles.web.js").default(t) | |
} | |
return o.a.deepmerge(r, s) | |
} | |
))(p)) | |
}, | |
"./musketeer/components/UIProgressSpinner/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIProgressSpinner/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
const r = { | |
marginLeft: "0px !important", | |
marginRight: "0px !important", | |
paddingBottom: "0px !important", | |
paddingLeft: "0px !important", | |
paddingRight: "0px !important", | |
paddingTop: "0px !important" | |
}; | |
t.default = function(e) { | |
const t = e.variables | |
, n = e.colors | |
, i = t.uiProgressSpinnerRadius | |
, o = t.uiProgressSpinnerBorderRadius; | |
return { | |
progressSpinnerContainer: { | |
width: 2 * i, | |
height: 2 * i, | |
overflow: "visible", | |
backgroundColor: n.accent12, | |
borderRadius: i | |
}, | |
progressSpinnerLeftContainer: { | |
position: "absolute", | |
top: 0, | |
left: 0, | |
width: i, | |
height: 2 * i, | |
overflow: "hidden" | |
}, | |
progressSpinnerRightContainer: { | |
position: "absolute", | |
top: 0, | |
left: i, | |
width: i, | |
height: 2 * i, | |
overflow: "hidden" | |
}, | |
progressSpinnerLeftProgressCircle: { | |
position: "absolute", | |
top: 0, | |
left: i, | |
width: i, | |
height: 2 * i, | |
borderRadius: "100%", | |
"-webkit-border-radius": i, | |
"-moz-border-radius": i, | |
backgroundColor: n.accent, | |
borderTopLeftRadius: 0, | |
borderBottomLeftRadius: 0, | |
transformOrigin: "0 50%" | |
}, | |
progressSpinnerRightProgressCircle: { | |
position: "absolute", | |
top: 0, | |
left: -i, | |
width: i, | |
height: 2 * i, | |
borderRadius: "100%", | |
"-webkit-border-radius": i, | |
"-moz-border-radius": i, | |
backgroundColor: n.accent, | |
borderTopRightRadius: 0, | |
borderBottomRightRadius: 0, | |
transformOrigin: "100% 50%" | |
}, | |
progressSpinnerInnerCircle: { | |
position: "relative", | |
top: o, | |
left: o, | |
width: 2 * (i - o), | |
height: 2 * (i - o), | |
textAlign: "center", | |
display: "flex", | |
flexDirection: "column", | |
justifyContent: "center", | |
alignItems: "center", | |
backgroundColor: n.white, | |
borderRadius: i - o | |
}, | |
iconArrow: Object.assign({ | |
fill: n.accent + " !important", | |
height: t.uiProgressSpinnerIconArrowSize + "px !important", | |
width: t.uiProgressSpinnerIconArrowSize + "px !important" | |
}, r), | |
iconStop: Object.assign({ | |
fill: n.accent + " !important", | |
height: t.uiProgressSpinnerIconStopSize + "px !important", | |
width: t.uiProgressSpinnerIconStopSize + "px !important" | |
}, r) | |
} | |
} | |
}, | |
"./musketeer/components/UIProgressSpinner/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIProgressSpinner/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIPublicationCover/assets sync recursive ^\\.\\/new.*\\.svg$": function(e, t, n) { | |
var r = { | |
"./new.svg": "./musketeer/components/UIPublicationCover/assets/new.svg" | |
}; | |
function i(e) { | |
var t = o(e); | |
return n(t) | |
} | |
function o(e) { | |
if (!n.o(r, e)) { | |
var t = new Error("Cannot find module '" + e + "'"); | |
throw t.code = "MODULE_NOT_FOUND", | |
t | |
} | |
return r[e] | |
} | |
i.keys = function() { | |
return Object.keys(r) | |
} | |
, | |
i.resolve = o, | |
e.exports = i, | |
i.id = "./musketeer/components/UIPublicationCover/assets sync recursive ^\\.\\/new.*\\.svg$" | |
}, | |
"./musketeer/components/UIPublicationCover/assets/new.svg": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = n.p + "musketeer/components/UIPublicationCover/assets/new.svg" | |
}, | |
"./musketeer/components/UIPublicationCover/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./musketeer/components/UIPublicationCover/node_modules/react-fela/es/index.js"), o = n("./musketeer/components/UIPrimitives/Platform.js"), s = n("./musketeer/components/UITools/index.js"), a = n("./node_modules/react/index.js"), u = n.n(a), l = n("./node_modules/react-i18next/dist/es/Translation.js"), c = n("./node_modules/prop-types/index.js"), d = n.n(c), f = n("./musketeer/components/UIPrimitives/index.js"), h = (n("./musketeer/components/UIText/index.js"), | |
n("./musketeer/components/UICover/index.js")), p = n("./musketeer/components/UIProgressSpinner/index.js"), m = n("./musketeer/components/UILabel/index.js"); | |
function b() { | |
return (b = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function g(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function y(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
class v extends u.a.PureComponent { | |
constructor(e) { | |
super(e), | |
y(this, "onImageScaled", (e,t,n,r)=>{ | |
const i = 100 - this.props.theme.variables.uiCoverImageMinHeightPercent | |
, o = 100 * Math.max(0, t - r) / t; | |
this.setState({ | |
topInPercent: Math.min(o, i) + "%" | |
}) | |
} | |
), | |
y(this, "clickHandler", (e,t)=>{ | |
t && t.stopPropagation(), | |
e && e(this.props.id) | |
} | |
), | |
y(this, "render", "android" === o.a.OS ? this.renderAndroid : "ios" === o.a.OS ? this.renderIOS : this.renderWeb), | |
this.state = { | |
topInPercent: "0%" | |
} | |
} | |
renderAndroid() { | |
return g(f.h, {}) | |
} | |
renderIOS() { | |
return g(f.h, {}) | |
} | |
renderWeb() { | |
const {borrowedDays: e, className: t, coverUri: n, downloadProgress: r, itemType: i, disabled: o, isDemo: a, isDownloaded: c, isNew: d, onItemClick: y, onCloudClick: v, style: _, styles: w} = this.props | |
, S = "AUDIOBOOK" === i; | |
return g(l.a, {}, void 0, l=>u.a.createElement(f.h, b({ | |
onClick: this.clickHandler.bind(this, y) | |
}, s.c.getTestAttr(this.props.testId), Object(s.d)([w.container, t, _])), g(h.a, { | |
shouldRefreshOn: this.props.shouldRefreshOn, | |
disabled: o, | |
coverUri: n, | |
additionalStyles: w.coverImage, | |
onImageScaled: this.onImageScaled, | |
itemType: i || "EBOOK" | |
}), u.a.createElement(f.h, b({}, Object(s.d)(w.badgeContainer), { | |
style: { | |
top: this.state.topInPercent | |
} | |
}), d && !a && u.a.createElement(u.a.Fragment, null, u.a.createElement(f.h, b({}, Object(s.d)(w.newBadge), { | |
style: this.state.newBadgeStyles | |
})), u.a.createElement(m.b, b({ | |
type: "bodyBold" | |
}, Object(s.d)(w.newBadgeText)), l("New"))), !c && !a && !S && u.a.createElement(p.a, b({}, Object(s.d)(w.downloadBadge), { | |
progress: r, | |
onClick: this.clickHandler.bind(this, v) | |
})), e > 0 && !a && u.a.createElement(f.h, Object(s.d)(w.borrowedBadge), u.a.createElement(m.b, Object(s.d)(w.borrowedBadgeText), `${e} ${l("Day", { | |
context: e > 1 ? "plural" : null | |
})}`))))) | |
} | |
} | |
v.propTypes = { | |
diabled: d.a.bool, | |
coverUri: d.a.string, | |
isNew: d.a.bool, | |
borrowedDays: d.a.number, | |
reseller: d.a.string, | |
isDownloaded: d.a.bool, | |
downloadProgress: d.a.number, | |
startDownloadRequest: d.a.func, | |
stopDownloadRequest: d.a.func, | |
isDemo: d.a.bool, | |
testId: d.a.string | |
}; | |
var _ = v; | |
const w = Object(i.b)(Object(i.a)((function(e) { | |
const t = n("./musketeer/components/UIPublicationCover/styles.common.js").default(e); | |
let r; | |
switch (o.a.OS) { | |
case "android": | |
r = n("./musketeer/components/UIPublicationCover/styles.android.js").default(e); | |
break; | |
case "ios": | |
r = n("./musketeer/components/UIPublicationCover/styles.ios.js").default(e); | |
break; | |
default: | |
r = n("./musketeer/components/UIPublicationCover/styles.web.js").default(e) | |
} | |
return s.a.deepmerge(t, r) | |
} | |
))(_)); | |
t.a = w | |
}, | |
"./musketeer/components/UIPublicationCover/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIPublicationCover/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
var r = n.p + "musketeer/components/UIPublicationCover/assets/borrowed.svg" | |
, i = n("./musketeer/components/UIPublicationCover/assets/new.svg"); | |
function o(e) { | |
try { | |
return n("./musketeer/components/UIPublicationCover/assets sync recursive ^\\.\\/new.*\\.svg$")("./new" + (e || "") + ".svg").default | |
} catch { | |
return i.default | |
} | |
} | |
t.default = function({itemType: e, layout: t, smallLayout: n, reseller: i, theme: s}) { | |
const {colors: a, fonts: u, mixins: l, variables: c} = s | |
, d = c.uiPublicationCoverNewBadgeSize | |
, f = n ? c.uiPublicationCoverContainerWidthSmall : c.uiPublicationCoverContainerWidth | |
, h = n ? c.uiPublicationCoverContainerHeightSmall : c.uiPublicationCoverContainerHeight | |
, p = "AUDIOBOOK" === e | |
, m = (null == t ? void 0 : t.coverWidth) || f; | |
return { | |
container: { | |
display: "inline-flex", | |
position: "relative", | |
height: p ? m : (null == t ? void 0 : t.coverHeight) || h, | |
width: m | |
}, | |
badgeContainer: { | |
position: "absolute", | |
bottom: 0, | |
left: 0, | |
right: 0, | |
top: 0 | |
}, | |
coverImage: { | |
position: "absolute !important", | |
bottom: 0, | |
left: 0, | |
right: 0, | |
top: 0 | |
}, | |
downloadBadge: { | |
position: "absolute", | |
right: 1.5 * c.basicUnit, | |
top: 1.5 * c.basicUnit, | |
zIndex: 1 | |
}, | |
newBadge: { | |
backgroundImage: "url('" + o(i) + "')", | |
backgroundSize: "contain", | |
backgroundRepeat: "no-repeat", | |
position: "absolute", | |
width: d, | |
height: d, | |
left: -3, | |
top: -3, | |
zIndex: 1 | |
}, | |
newBadgeText: Object.assign(u.bodyBold(), l.textEllipsis(), { | |
color: a.white, | |
position: "absolute", | |
textAlign: "center", | |
width: d, | |
top: d / 2 + 4 - 3, | |
left: 0, | |
transform: "rotate(-45deg)", | |
transformOrigin: "center left", | |
zIndex: 1 | |
}), | |
borrowedBadge: { | |
backgroundImage: "url('" + r + "')", | |
backgroundSize: "contain", | |
backgroundRepeat: "no-repeat", | |
backgroundPosition: "50% 100%", | |
position: "absolute", | |
width: c.uiPublicationCoverBorrowedBadgeWidth, | |
height: c.uiPublicationCoverBorrowedBadgeHeight, | |
bottom: 11, | |
left: "50%", | |
transform: "translateX(-50%)", | |
zIndex: 1 | |
}, | |
borrowedBadgeText: Object.assign(u.smallBold(), l.textEllipsis(), { | |
position: "absolute", | |
fontSize: 14, | |
verticalAlign: "middle", | |
color: a.white, | |
textAlign: "right", | |
height: "100%", | |
left: "30%", | |
right: "15%", | |
zIndex: 1 | |
}) | |
} | |
} | |
}, | |
"./musketeer/components/UIPublicationCover/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIPublicationCover/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIResellerLogo/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./musketeer/components/UIResellerLogo/node_modules/react-fela/es/index.js") | |
, i = n("./musketeer/components/UIPrimitives/Platform.js") | |
, o = n("./musketeer/components/UITools/index.js") | |
, s = n("./node_modules/react/index.js") | |
, a = n.n(s) | |
, u = n("./node_modules/prop-types/index.js") | |
, l = n.n(u) | |
, c = n("./musketeer/components/UIPrimitives/index.js"); | |
function d() { | |
return (d = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
const f = { | |
logoBertelsmannde: n.p + "musketeer/components/UIResellerLogo/logos/logo-bertelsmannde.png", | |
logoBildde: n.p + "musketeer/components/UIResellerLogo/logos/logo-bildde.png", | |
logoBlznl: n.p + "musketeer/components/UIResellerLogo/logos/logo-blznl.png", | |
logoBoekhandelbe: n.p + "musketeer/components/UIResellerLogo/logos/logo-boekhandelbe.png", | |
logoBooksch: n.p + "musketeer/components/UIResellerLogo/logos/logo-booksch.png", | |
logoBuchch: n.p + "musketeer/components/UIResellerLogo/logos/logo-buchch.png", | |
logoBuchde: n.p + "musketeer/components/UIResellerLogo/logos/logo-buchde.png", | |
logoBuecherde: n.p + "musketeer/components/UIResellerLogo/logos/logo-buecherde.png", | |
logoClubbe: n.p + "musketeer/components/UIResellerLogo/logos/logo-clubbe.png", | |
logoDonaulandat: n.p + "musketeer/components/UIResellerLogo/logos/logo-donaulandat.png", | |
logoEbookde: n.p + "musketeer/components/UIResellerLogo/logos/logo-ebookde.png", | |
logoHugendubelde: n.p + "musketeer/components/UIResellerLogo/logos/logo-hugendubelde.png", | |
logoIbsit: n.p + "musketeer/components/UIResellerLogo/logos/logo-ibsit.png", | |
logoIndiebookit: n.p + "musketeer/components/UIResellerLogo/logos/logo-indiebookit.png", | |
logoLibraccioit: n.p + "musketeer/components/UIResellerLogo/logos/logo-libraccioit.png", | |
logoLibride: n.p + "musketeer/components/UIResellerLogo/logos/logo-libride.png", | |
logoLibrisnl: n.p + "musketeer/components/UIResellerLogo/logos/logo-librisnl.png", | |
logoMayerschede: n.p + "musketeer/components/UIResellerLogo/logos/logo-mayerschede.png", | |
logoOrellfuesslich: n.p + "musketeer/components/UIResellerLogo/logos/logo-orellfuesslich.png", | |
logoOsianderde: n.p + "musketeer/components/UIResellerLogo/logos/logo-osianderde.png", | |
logoOttode: n.p + "musketeer/components/UIResellerLogo/logos/logo-ottode.png", | |
logoThaliaat: n.p + "musketeer/components/UIResellerLogo/logos/logo-thaliaat.png", | |
logoThaliach: n.p + "musketeer/components/UIResellerLogo/logos/logo-thaliach.png", | |
logoThaliade: n.p + "musketeer/components/UIResellerLogo/logos/logo-thaliade.png", | |
logoTolinode: n.p + "musketeer/components/UIResellerLogo/logos/logo-tolinode.png", | |
logoWeltbildat: n.p + "musketeer/components/UIResellerLogo/logos/logo-weltbildat.png", | |
logoWeltbildch: n.p + "musketeer/components/UIResellerLogo/logos/logo-weltbildch.png", | |
logoWeltbildde: n.p + "musketeer/components/UIResellerLogo/logos/logo-weltbildde.png" | |
}; | |
class h extends a.a.Component { | |
render() { | |
let {width: e, height: t, styles: n} = this.props; | |
const r = [n.logo, n["align" + o.a.uppercaseFirstLetter(this.props.alignX)], n["align" + o.a.uppercaseFirstLetter(this.props.alignY)]]; | |
let i = "logo" + o.a.uppercaseFirstLetter(this.props.reseller); | |
f[i] || (i = "logoTolinode"), | |
t = t.constructor === Number ? t + "px" : t, | |
e = e.constructor === Number ? e + "px" : e; | |
const s = { | |
backgroundImage: "url(" + f[i] + ")", | |
backgroundSize: "auto " + t | |
}; | |
let u = this.props.testId ? this.props.testId : "resellerLogo-" + this.props.reseller; | |
return a.a.createElement(c.h, d({}, o.c.getTestAttr(u), o.b.getStylesForPlatform(r), { | |
style: s | |
})) | |
} | |
} | |
h.propTypes = { | |
alignX: l.a.oneOf(["left", "centerx", "right"]), | |
alignY: l.a.oneOf(["top", "centery", "bottom"]), | |
height: l.a.oneOfType([l.a.string, l.a.number]), | |
reseller: l.a.string.isRequired, | |
width: l.a.oneOfType([l.a.string, l.a.number]) | |
}, | |
h.defaultProps = { | |
alignX: "centerx", | |
alignY: "centery", | |
height: "100%", | |
width: "100%" | |
}; | |
var p = h; | |
t.a = Object(r.b)(Object(r.a)((function(e) { | |
const t = e.theme | |
, r = n("./musketeer/components/UIResellerLogo/styles.common.js").default(t); | |
let s; | |
switch (i.a.OS) { | |
case "android": | |
s = n("./musketeer/components/UIResellerLogo/styles.android.js").default(t); | |
break; | |
case "ios": | |
s = n("./musketeer/components/UIResellerLogo/styles.ios.js").default(t); | |
break; | |
default: | |
s = n("./musketeer/components/UIResellerLogo/styles.web.js").default(t) | |
} | |
return o.a.deepmerge(r, s) | |
} | |
))(p)) | |
}, | |
"./musketeer/components/UIResellerLogo/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIResellerLogo/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return { | |
logo: { | |
backgroundRepeat: "no-repeat", | |
height: "100%", | |
width: "100%" | |
}, | |
alignLeft: { | |
backgroundPositionX: "left" | |
}, | |
alignCenterx: { | |
backgroundPositionX: "center" | |
}, | |
alignRight: { | |
backgroundPositionX: "right" | |
}, | |
alignTop: { | |
backgroundPositionY: "top" | |
}, | |
alignCentery: { | |
backgroundPositionY: "center" | |
}, | |
alignBottom: { | |
backgroundPositionY: "bottom" | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UIResellerLogo/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIResellerLogo/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/components/UISpacer/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/react-fela/es/index.js") | |
, i = n("./musketeer/components/UIPrimitives/Platform.js") | |
, o = n("./musketeer/components/UITools/index.js") | |
, s = n("./node_modules/react/index.js") | |
, a = n.n(s) | |
, u = n("./node_modules/prop-types/index.js") | |
, l = n.n(u) | |
, c = n("./musketeer/components/UIPrimitives/index.js"); | |
function d() { | |
return (d = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
class f extends a.a.Component { | |
getAppliedStyles() { | |
const {styles: e} = this.props; | |
let t = [e.spacer]; | |
return t.push([this.props.additionalStyles]), | |
[t] | |
} | |
renderAndroid() { | |
this.getAppliedStyles(); | |
return null | |
} | |
renderIOS() { | |
this.getAppliedStyles(); | |
return null | |
} | |
renderWeb() { | |
const e = this.getAppliedStyles(); | |
let {width: t, height: n} = this.props; | |
n = isNaN(n) ? n : n + "px", | |
t = isNaN(t) ? t : t + "px"; | |
const r = { | |
width: t, | |
height: n | |
}; | |
return a.a.createElement(c.h, d({}, o.b.getStylesForPlatform(e), { | |
style: r | |
})) | |
} | |
render() { | |
let e; | |
switch (i.a.OS) { | |
case "android": | |
e = this.renderAndroid(); | |
break; | |
case "ios": | |
e = this.renderIOS(); | |
break; | |
default: | |
e = this.renderWeb() | |
} | |
return e | |
} | |
} | |
f.propTypes = { | |
height: l.a.oneOfType([l.a.number, l.a.string]), | |
width: l.a.oneOfType([l.a.number, l.a.string]), | |
additionalStyles: l.a.oneOfType([l.a.array, l.a.object, l.a.string]) | |
}, | |
f.defaultProps = { | |
height: 1, | |
width: 1 | |
}; | |
var h = f; | |
t.a = Object(r.e)(Object(r.c)((function(e) { | |
const t = e.theme | |
, r = n("./musketeer/components/UISpacer/styles.common.js").default(t); | |
let s; | |
switch (i.a.OS) { | |
case "android": | |
s = n("./musketeer/components/UISpacer/styles.android.js").default(t); | |
break; | |
case "ios": | |
s = n("./musketeer/components/UISpacer/styles.ios.js").default(t); | |
break; | |
default: | |
s = n("./musketeer/components/UISpacer/styles.web.js").default(t) | |
} | |
return o.a.deepmerge(r, s) | |
} | |
))(h)) | |
}, | |
"./musketeer/components/UISpacer/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
e.colors, | |
e.variables; | |
return {} | |
} | |
}, | |
"./musketeer/components/UISpacer/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
e.colors, | |
e.variables; | |
return { | |
spacer: {} | |
} | |
} | |
}, | |
"./musketeer/components/UISpacer/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
e.colors, | |
e.variables; | |
return {} | |
} | |
}, | |
"./musketeer/components/UISpacer/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
e.colors, | |
e.variables; | |
return {} | |
} | |
}, | |
"./musketeer/components/UIText/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./musketeer/components/UIText/node_modules/react-fela/es/index.js") | |
, i = n("./musketeer/components/UIPrimitives/Platform.js") | |
, o = n("./musketeer/components/UITools/index.js") | |
, s = n("./node_modules/react/index.js") | |
, a = n.n(s) | |
, u = n("./node_modules/prop-types/index.js") | |
, l = n.n(u) | |
, c = n("./musketeer/components/UIPrimitives/index.js"); | |
function d() { | |
return (d = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function f(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
const h = "web" === i.a.OS; | |
class p extends a.a.Component { | |
constructor(...e) { | |
super(...e), | |
f(this, "render", h ? this.renderWeb : this.renderMobile) | |
} | |
renderMobile() {} | |
renderWeb() { | |
const {additionalStyles: e, children: t, className: n, content: r, numberOfLines: i, selectable: s, styles: u, testId: l} = this.props | |
, f = [u.initial, n, s ? u.selectable : u.notSelectable, 1 === i && u.singleLine, "string" == typeof e && e] | |
, h = "object" == typeof e ? { | |
...this.props.style, | |
...e | |
} : this.props.style; | |
return a.a.createElement(c.c, d({}, Object(o.d)(f), o.c.getTestAttr(l), { | |
style: h | |
}), r || t) | |
} | |
} | |
f(p, "propTypes", { | |
additionalStyles: l.a.oneOfType([l.a.array, l.a.object, l.a.string]), | |
content: l.a.string, | |
numberOfLines: l.a.number, | |
selectable: l.a.bool, | |
testId: l.a.string | |
}), | |
f(p, "defaultProps", { | |
selectable: !1 | |
}); | |
t.a = Object(r.b)(Object(r.a)((function(e) { | |
const t = e.theme | |
, r = n("./musketeer/components/UIText/styles.common.js").default(t); | |
let s; | |
switch (i.a.OS) { | |
case "android": | |
s = n("./musketeer/components/UIText/styles.android.js").default(t); | |
break; | |
case "ios": | |
s = n("./musketeer/components/UIText/styles.ios.js").default(t); | |
break; | |
default: | |
s = n("./musketeer/components/UIText/styles.web.js").default(t) | |
} | |
return o.a.deepmerge(r, s) | |
} | |
))(p)) | |
}, | |
"./musketeer/components/UIText/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIText/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIText/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
return {} | |
} | |
}, | |
"./musketeer/components/UIText/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function(e) { | |
const t = e.mixins; | |
return { | |
initial: { | |
borderWidth: 0, | |
boxSizing: "border-box", | |
color: "inherit", | |
display: "inline", | |
fontStyle: "inherit", | |
fontWeight: "inherit", | |
lineHeight: "inherit", | |
margin: 0, | |
padding: 0, | |
textDecoration: "none", | |
whiteSpace: "pre-wrap", | |
wordWrap: "break-word" | |
}, | |
selectable: t.userSelect(!0), | |
notSelectable: t.userSelect(!1), | |
singleLine: { | |
maxWidth: "100%", | |
overflow: "hidden", | |
textOverflow: "ellipsis", | |
whiteSpace: "nowrap !important" | |
} | |
} | |
} | |
}, | |
"./musketeer/components/UITextInput/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./node_modules/react/index.js"), s = n.n(o), a = n("./musketeer/components/UITextInput/node_modules/prop-types/index.js"), u = n.n(a), l = n("./musketeer/components/UIPrimitives/index.js"), c = n("./musketeer/components/UITools/index.js"), d = n("./musketeer/components/UIIcon/index.js"); | |
function f() { | |
return (f = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
function h(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
function p(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
class m extends s.a.Component { | |
constructor(e) { | |
super(e), | |
p(this, "handleKeyUp", e=>{ | |
13 === e.keyCode ? (e.stopPropagation(), | |
this.onSubmit()) : 27 === e.keyCode && (e.stopPropagation(), | |
this.props.clear()) | |
} | |
), | |
p(this, "handleChange", e=>{ | |
this.props.change(e.target.value) | |
} | |
), | |
p(this, "onBlur", ()=>{ | |
this.props.handleFocus(!1) | |
} | |
), | |
p(this, "onFocus", ()=>{ | |
this.props.handleFocus(!0) | |
} | |
), | |
p(this, "onSubmit", ()=>{ | |
if (this.props.submit) { | |
const e = this.input.current.value.length; | |
!this.props.minLengthForSubmit || this.props.minLengthForSubmit && e >= this.props.minLengthForSubmit ? (this.input.current.blur(), | |
this.props.submit()) : this.props.submitError && this.props.submitError("searchTermLengthTooShort") | |
} | |
} | |
), | |
this.input = s.a.createRef() | |
} | |
componentDidMount() { | |
this.props.onRef && this.props.onRef(this), | |
this.props.autoFocus && this.input.current.focus() | |
} | |
componentWillUnmount() { | |
this.props.onRef && this.props.onRef(void 0) | |
} | |
render() { | |
const {clear: e, icon: t, placeholder: n, styles: r, testId: i, type: o, validate: a, value: u} = this.props | |
, p = "search" === o | |
, m = [r.input, a(u) ? null : r.inputInvalid, p || t ? r.inputAddPaddingLeft : null, p ? r.inputAddPaddingRight : null]; | |
return s.a.createElement(l.h, c.b.getStylesForPlatform(r.inputView), p && h(d.a, { | |
additionalStyles: r.search, | |
icon: t || "search" | |
}), s.a.createElement(l.e, f({}, c.c.getTestAttr(i), { | |
ref: this.input, | |
type: "text", | |
value: u, | |
onBlur: this.onBlur, | |
onFocus: this.onFocus, | |
onKeyUp: this.handleKeyUp, | |
onChange: this.handleChange, | |
placeholder: n | |
}, c.b.getStylesForPlatform(m))), u && p && h(d.a, { | |
testId: i + "-iconCancel", | |
additionalStyles: r.clearSearch, | |
icon: "cancel", | |
onClick: e | |
})) | |
} | |
} | |
m.propTypes = { | |
type: u.a.string, | |
change: u.a.func.isRequired, | |
clear: u.a.func, | |
handleFocus: u.a.func, | |
autoFocus: u.a.bool, | |
icon: u.a.string, | |
minLengthForSubmit: u.a.number, | |
placeholder: u.a.string, | |
submit: u.a.func, | |
submitError: u.a.func, | |
testId: u.a.string, | |
validate: u.a.func, | |
value: u.a.string.isRequired | |
}, | |
m.defaultProps = { | |
clear: Function.prototype, | |
handleFocus: Function.prototype, | |
autoFocus: !1, | |
validate: ()=>!0 | |
}; | |
var b = m; | |
t.a = Object(i.e)(Object(i.c)((function(e) { | |
const t = e.theme | |
, n = t.colors | |
, r = t.variables | |
, i = 4.5 * r.basicUnit | |
, o = (i - r.uiIconHeight) / 2; | |
return { | |
inputView: { | |
backgroundColor: n.transparent, | |
display: "flex", | |
height: i, | |
position: "relative", | |
width: "100%" | |
}, | |
input: { | |
backgroundColor: n.primary, | |
borderColor: n.tertiary, | |
borderStyle: "solid", | |
borderWidth: 1, | |
borderRadius: i / 2, | |
caretColor: n.accent, | |
height: "100%", | |
fontSize: ("small" === e.type ? r.fontSizeSmall : r.fontSizeBody) + "rem", | |
left: 0, | |
paddingLeft: 2 * r.basicUnit, | |
paddingRight: 2 * r.basicUnit, | |
width: "100%", | |
":focus": { | |
borderColor: n.accent, | |
caretColor: n.accent | |
} | |
}, | |
inputAddPaddingLeft: { | |
paddingLeft: r.uiIconWidth | |
}, | |
inputAddPaddingRight: { | |
paddingRight: r.uiIconWidth - r.basicUnit | |
}, | |
inputFocus: { | |
borderColor: n.accent, | |
caretColor: n.accent | |
}, | |
inputInvalid: { | |
borderColor: n.critical, | |
caretColor: n.critical | |
}, | |
search: { | |
fill: n.black40, | |
marginLeft: 0, | |
marginRight: 0, | |
marginTop: o, | |
pointerEvents: "none", | |
position: "absolute", | |
top: 0 | |
}, | |
clearSearch: { | |
fill: n.tertiary, | |
height: i, | |
padding: 6, | |
position: "absolute", | |
right: -r.basicUnit, | |
top: 0 | |
} | |
} | |
} | |
), { | |
withRef: !0 | |
})(b)) | |
}, | |
"./musketeer/components/UITools/index.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return i | |
} | |
)), | |
n.d(t, "d", (function() { | |
return s | |
} | |
)), | |
n.d(t, "b", (function() { | |
return a | |
} | |
)), | |
n.d(t, "c", (function() { | |
return u | |
} | |
)); | |
class r { | |
static deepmerge(e, t, n) { | |
const i = function(e) { | |
return e && "object" == typeof e && "[object RegExp]" !== Object.prototype.toString.call(e) && "[object Date]" !== Object.prototype.toString.call(e) | |
} | |
, o = function(e, t) { | |
var n; | |
return t && !0 === t.clone && i(e) ? r.deepmerge((n = e, | |
Array.isArray(n) ? [] : {}), e, t) : e | |
} | |
, s = function(e, t, n) { | |
var s = e.slice(); | |
return t.forEach((function(t, a) { | |
void 0 === s[a] ? s[a] = o(t, n) : i(t) ? s[a] = r.deepmerge(e[a], t, n) : -1 === e.indexOf(t) && s.push(o(t, n)) | |
} | |
)), | |
s | |
}; | |
var a = Array.isArray(t) | |
, u = (n || { | |
arrayMerge: s | |
}).arrayMerge || s; | |
return a ? Array.isArray(e) ? u(e, t, n) : o(t, n) : function(e, t, n) { | |
var s = {}; | |
return i(e) && Object.keys(e).forEach((function(t) { | |
s[t] = o(e[t], n) | |
} | |
)), | |
Object.keys(t).forEach((function(a) { | |
i(t[a]) && e[a] ? s[a] = r.deepmerge(e[a], t[a], n) : s[a] = o(t[a], n) | |
} | |
)), | |
s | |
}(e, t, n) | |
} | |
static uppercaseFirstLetter(e) { | |
return e.charAt(0).toUpperCase() + e.substring(1) | |
} | |
} | |
var i = r | |
, o = n("./musketeer/components/UIPrimitives/Platform.js"); | |
if (!Array.prototype.flat) { | |
const e = function() { | |
var t = []; | |
if (!this || !this.length) | |
return t; | |
for (let n = 0; n < this.length; n++) | |
t.push.apply(t, Array.isArray(this[n]) ? e(this[n]) : [this[n]]); | |
return t | |
}; | |
Array.prototype.flat = e | |
} | |
const s = "web" === o.a.OS ? function(e) { | |
return e ? e instanceof Array ? { | |
className: e.flat().filter(e=>e).join(" ") | |
} : { | |
className: e | |
} : {} | |
} | |
: function(e) { | |
return e ? { | |
style: e = e instanceof Array ? e.flat().filter(e=>e) : [e] | |
} : {} | |
} | |
; | |
class a { | |
static getStylesForPlatform(e, t=o.a.OS) { | |
let n; | |
switch (e.constructor !== Array && (e = [e]), | |
e = e.flat().filter(e=>e), | |
t) { | |
case "android": | |
case "ios": | |
n = "style"; | |
break; | |
default: | |
n = "className" | |
} | |
switch (o.a.OS) { | |
case "web": | |
e = e.join(" ") | |
} | |
return { | |
[n]: e | |
} | |
} | |
} | |
var u = class { | |
static getTestAttr(e) { | |
let t; | |
switch (o.a.OS) { | |
case "android": | |
case "ios": | |
t = "testId"; | |
break; | |
default: | |
t = "data-test-id" | |
} | |
return { | |
[t]: e | |
} | |
} | |
} | |
}, | |
"./musketeer/modules/_utils/filterOutNullValues.ts": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return r | |
} | |
)); | |
const r = e=>e.filter(Boolean) | |
}, | |
"./musketeer/modules/_utils/typeof.ts": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return r | |
} | |
)); | |
const r = e=>Array.isArray(e) | |
}, | |
"./musketeer/modules/async-storage/index.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./musketeer/modules/async-storage/storage.worker.js"); | |
const i = ["tolino-settings", "tolino-reseller", "tolino-user", "tolino-bookshelf"]; | |
let o = { | |
DATABASE_NAME: "sample-reader", | |
OBJECT_STORE: "AsyncStorage", | |
VERSION: 1 | |
} | |
, s = !1; | |
const a = n.n(r)()() | |
, u = {}; | |
function l(e) { | |
var t = e.data; | |
if (t) { | |
const e = u[t.request + t.key]; | |
if (e) { | |
if (t.error) | |
if ("BROWSER_STORAGE_FAIL" === t.error) { | |
const {DATABASE_NAME: n, request: r, key: o, value: s} = t; | |
if (i.includes(n)) { | |
switch (r) { | |
case "getitem": | |
try { | |
o ? e.resolve(JSON.parse(sessionStorage.getItem(t.key))) : e.reject(void 0) | |
} catch (t) { | |
e.reject(t) | |
} | |
break; | |
case "setitem": | |
try { | |
o && s ? e.resolve(sessionStorage.setItem(o, JSON.stringify(s))) : e.reject(void 0) | |
} catch (n) { | |
e.reject(t) | |
} | |
break; | |
case "removeitem": | |
o && sessionStorage.removeItem(o), | |
e.resolve(t); | |
break; | |
case "clear": | |
e.resolve(sessionStorage.clear()); | |
break; | |
default: | |
e.reject(t.error) | |
} | |
delete u[t.request + t.key] | |
} else | |
e.reject(t.error) | |
} else | |
e.reject(t.error); | |
else | |
e.resolve(t.value); | |
delete u[t.request + t.key] | |
} | |
} | |
} | |
async function c(e, t, n, r) { | |
return s || async function() { | |
a.addEventListener("message", l), | |
s = !0 | |
}(), | |
new Promise(async(i,s)=>{ | |
u[e + t] = { | |
resolve: i, | |
reject: s | |
}; | |
let l = r || o; | |
a.postMessage({ | |
...l, | |
request: e, | |
key: t, | |
value: n | |
}) | |
} | |
) | |
} | |
t.a = class { | |
static setConfiguration(e) { | |
o = e | |
} | |
static async getItem(e, t) { | |
return c("getitem", e, null, t) | |
} | |
static async setItem(e, t, n) { | |
return c("setitem", e, t, n) | |
} | |
static async removeItem(e, t) { | |
return c("removeitem", e, null, t) | |
} | |
static async clear(e) { | |
return c("clear", null, null, e) | |
} | |
static async getAllKeys(e) { | |
return c("getallkeys", null, null, e) | |
} | |
} | |
}, | |
"./musketeer/modules/async-storage/storage.worker.js": function(e, t, n) { | |
e.exports = function() { | |
return new Worker(n.p + "storage.worker.js") | |
} | |
}, | |
"./musketeer/modules/familiy-sharing/index.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "z", (function() { | |
return a | |
} | |
)), | |
n.d(t, "a", (function() { | |
return u | |
} | |
)), | |
n.d(t, "n", (function() { | |
return d | |
} | |
)), | |
n.d(t, "i", (function() { | |
return W | |
} | |
)), | |
n.d(t, "E", (function() { | |
return K | |
} | |
)), | |
n.d(t, "f", (function() { | |
return Z | |
} | |
)), | |
n.d(t, "d", (function() { | |
return $ | |
} | |
)), | |
n.d(t, "c", (function() { | |
return J | |
} | |
)), | |
n.d(t, "C", (function() { | |
return ee | |
} | |
)), | |
n.d(t, "g", (function() { | |
return ne | |
} | |
)), | |
n.d(t, "m", (function() { | |
return te | |
} | |
)), | |
n.d(t, "h", (function() { | |
return X | |
} | |
)), | |
n.d(t, "e", (function() { | |
return Q | |
} | |
)), | |
n.d(t, "D", (function() { | |
return Y | |
} | |
)), | |
n.d(t, "k", (function() { | |
return G | |
} | |
)), | |
n.d(t, "l", (function() { | |
return V | |
} | |
)), | |
n.d(t, "j", (function() { | |
return re | |
} | |
)), | |
n.d(t, "A", (function() { | |
return ie | |
} | |
)), | |
n.d(t, "B", (function() { | |
return oe | |
} | |
)), | |
n.d(t, "b", (function() { | |
return fe | |
} | |
)), | |
n.d(t, "r", (function() { | |
return L | |
} | |
)), | |
n.d(t, "u", (function() { | |
return P | |
} | |
)), | |
n.d(t, "o", (function() { | |
return B | |
} | |
)), | |
n.d(t, "t", (function() { | |
return I | |
} | |
)), | |
n.d(t, "q", (function() { | |
return R | |
} | |
)), | |
n.d(t, "p", (function() { | |
return N | |
} | |
)), | |
n.d(t, "v", (function() { | |
return H | |
} | |
)), | |
n.d(t, "x", (function() { | |
return T | |
} | |
)), | |
n.d(t, "y", (function() { | |
return D | |
} | |
)), | |
n.d(t, "w", (function() { | |
return q | |
} | |
)), | |
n.d(t, "s", (function() { | |
return z | |
} | |
)); | |
var r = n("./musketeer/modules/tolino-shared/index.js") | |
, i = n("./musketeer/modules/async-storage/index.js"); | |
function o(e) { | |
return { | |
type: "SET_FAMILY", | |
value: e | |
} | |
} | |
function s(e) { | |
return { | |
type: "SET_MYSELF", | |
value: e | |
} | |
} | |
function a(e) { | |
return { | |
type: "SET_FAMILY_MEMBER", | |
value: e | |
} | |
} | |
function u() { | |
return { | |
type: "CLEAR_FAMILY_MEMBER" | |
} | |
} | |
const l = window.tolino.config | |
, c = r.c.getDebouncedFunction((function(e) { | |
i.a.setItem("familySharing", e, l.APP) | |
} | |
), 200); | |
function d() { | |
return e=>i.a.getItem("familySharing", l.APP).then(t=>e({ | |
type: "RESTORE_STATE", | |
value: t | |
}), e=>console.warn("Error restoring state from AsyncStorage", e)) | |
} | |
var f = n("./musketeer/modules/tolino-cloud/headers.js") | |
, h = n("./musketeer/modules/tolino-cloud/util.js"); | |
const p = Object.freeze(Object.create(null)) | |
, m = Object.freeze([]) | |
, b = Object.freeze({ | |
members: m, | |
maxMembers: 6 | |
}) | |
, g = Object.freeze({ | |
membershipId: void 0, | |
nickname: "" | |
}); | |
var y = n("./musketeer/modules/familiy-sharing/utils.js"); | |
const v = window.tolino.config | |
, _ = Object(y.c)(); | |
function w(e, t, n) { | |
return _(n ? "fetchMember" : "fetchMyself", ()=>new Promise((n,r)=>(v.NET.OAUTHSIM && (t["Reseller-Id"] = "1"), | |
Object(h.a)(e, t).then(e=>{ | |
if (e && e.nickname) | |
return n(e); | |
r("Empty Response for Nickname") | |
} | |
).catch(e=>r(e))))) | |
} | |
function S(e, t, n) { | |
return _("updateMyself", ()=>new Promise((r,i)=>(v.NET.OAUTHSIM && (t["Reseller-Id"] = "1"), | |
Object(h.a)(e, t, "PUT", 1e4, JSON.stringify({ | |
nickname: n | |
})).then(e=>{ | |
if (e && e.nickname) | |
return r(e); | |
i("Empty Response for Nickname") | |
} | |
).catch(e=>i(e))))) | |
} | |
function E(e, t) { | |
return e === t | |
} | |
function j(e, t, n) { | |
if (null === t || null === n || t.length !== n.length) | |
return !1; | |
for (var r = t.length, i = 0; i < r; i++) | |
if (!e(t[i], n[i])) | |
return !1; | |
return !0 | |
} | |
function x(e) { | |
var t = Array.isArray(e[0]) ? e[0] : e; | |
if (!t.every((function(e) { | |
return "function" == typeof e | |
} | |
))) { | |
var n = t.map((function(e) { | |
return typeof e | |
} | |
)).join(", "); | |
throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: [" + n + "]") | |
} | |
return t | |
} | |
var O = function(e) { | |
for (var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) | |
n[r - 1] = arguments[r]; | |
return function() { | |
for (var t = arguments.length, r = Array(t), i = 0; i < t; i++) | |
r[i] = arguments[i]; | |
var o = 0 | |
, s = r.pop() | |
, a = x(r) | |
, u = e.apply(void 0, [function() { | |
return o++, | |
s.apply(null, arguments) | |
} | |
].concat(n)) | |
, l = e((function() { | |
for (var e = [], t = a.length, n = 0; n < t; n++) | |
e.push(a[n].apply(null, arguments)); | |
return u.apply(null, e) | |
} | |
)); | |
return l.resultFunc = s, | |
l.dependencies = a, | |
l.recomputations = function() { | |
return o | |
} | |
, | |
l.resetRecomputations = function() { | |
return o = 0 | |
} | |
, | |
l | |
} | |
}((function(e) { | |
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : E | |
, n = null | |
, r = null; | |
return function() { | |
return j(t, n, arguments) || (r = e.apply(null, arguments)), | |
n = arguments, | |
r | |
} | |
} | |
)); | |
function M(e) { | |
return e.inventory.entitlements | |
} | |
function k(e) { | |
var t; | |
return (null === (t = e.family) || void 0 === t ? void 0 : t.family) || b | |
} | |
function A(e) { | |
return k(e).members.length | |
} | |
function C(e) { | |
return e.family.shares || p | |
} | |
function I(e) { | |
return e.family.myself || g | |
} | |
function R(e) { | |
return e.family.familyMember || g | |
} | |
function T(e) { | |
return e.family.resellers || m | |
} | |
function P(e, t) { | |
return e.family && e.family.oAuthConfig && e.family.oAuthConfig[t] || p | |
} | |
const L = O([I, k], (e,t)=>e && t ? { | |
...t, | |
members: t.members.filter(t=>t.membershipId !== e.membershipId) | |
} : t || b) | |
, N = O([L], e=>e.members.map(e=>e.membershipId) || []) | |
, B = O([L, function(e, t) { | |
return C(e)[t] | |
} | |
], (e,t)=>{ | |
var n; | |
return null == e || null === (n = e.members) || void 0 === n || n.forEach(e=>{ | |
const n = null == t ? void 0 : t.receivers; | |
n && n.forEach(t=>{ | |
e.membershipId === t.membershipId && (e.hasReceived = !0) | |
} | |
) | |
} | |
), | |
null == e ? void 0 : e.members | |
} | |
) | |
, D = O([M, function(e) { | |
return k(e).members | |
} | |
, A, C, R], (e,t,n,r,i)=>{ | |
let o = Object.keys(e).filter(t=>e[t] && e[t].isShareable); | |
o = o.filter(e=>{ | |
return ((null === (t = r[e]) || void 0 === t || null === (i = t.receivers) || void 0 === i ? void 0 : i.length) || 0) < n - 1; | |
var t, i | |
} | |
); | |
const s = t.find(e=>e.nickname === (null == i ? void 0 : i.nickname)); | |
if (s) { | |
const e = e=>{ | |
var t, n; | |
const i = s.membershipId; | |
return null === (t = r[e]) || void 0 === t || null === (n = t.receivers) || void 0 === n ? void 0 : n.some(e=>i === e.membershipId) | |
} | |
; | |
o = o.filter(t=>!e(t)) | |
} | |
const a = Object.create(null); | |
return o.forEach(t=>a[e[t].id] = e[t]), | |
a | |
} | |
) | |
, U = O([M, C], (e,t)=>Object.values(t).filter(e=>"RECEIVED" === e.type).map(t=>e[t.publicationId])); | |
function F(e, t) { | |
const n = e === r.j.ENTITLEMENT_TYPES.AUDIOBOOK ? r.j.NET.METADATA.TAG_FAMILY_SHARING_AUDIO : r.j.NET.METADATA.TAG_FAMILY_SHARING_EBOOK; | |
return 0 === t.length ? null : { | |
category: r.j.MISC.SYSTEM_CATEGORY, | |
displayName: n, | |
id: n, | |
items: t, | |
modified: Date.now(), | |
name: n, | |
title: n, | |
type: e | |
} | |
} | |
const H = O([U], e=>({ | |
[r.j.NET.METADATA.TAG_FAMILY_SHARING_EBOOK]: F(r.j.ENTITLEMENT_TYPES.EBOOK, e.filter(e=>e && !e.audioInfos).map(e=>e.id)), | |
[r.j.NET.METADATA.TAG_FAMILY_SHARING_AUDIO]: F(r.j.ENTITLEMENT_TYPES.AUDIOBOOK, e.filter(e=>e && e.audioInfos).map(e=>e.id)) | |
})) | |
, z = O([A, function(e) { | |
return k(e).maxMembers | |
} | |
], (e,t)=>t - e) | |
, q = O([function(e) { | |
return e.resellerInfo | |
} | |
], e=>{ | |
const t = e.config.URL_SHOP_EBOOK_START_PAGE | |
, n = e.channelId; | |
return t && n && (t.indexOf("?") > -1 ? t += "&channelid=" + n : t += "?channelid=" + n), | |
t | |
} | |
); | |
function W(e) { | |
return (t,n)=>{ | |
const r = n().resellerInfo.config.URL_FAMILY; | |
return n().token.isDemo ? e && e() : Object(f.a)(t, n, null, !0).then(e=>(delete e["Hardware-Id"], | |
w(r + "/v1/myself", e))).then(e=>t(s(e))).catch(e=>console.warn(e)).finally(()=>e && e()) | |
} | |
} | |
function K(e, t) { | |
return (n,r)=>Object(f.a)(n, r, null, !0).then(t=>{ | |
const n = r().resellerInfo.config.URL_FAMILY; | |
return delete t["Hardware-Id"], | |
S(n + "/v1/myself", t, e) | |
} | |
).then(e=>n(s(e))).catch(e=>console.warn(e)).finally(()=>t && t()) | |
} | |
function G(e, t) { | |
return (n,r)=>{ | |
const i = r(); | |
try { | |
window.sessionStorage.setItem("familyState", JSON.stringify({ | |
uiState: e, | |
redux: i.family | |
})) | |
} catch (e) { | |
console.error(e) | |
} | |
t && t() | |
} | |
} | |
function V(e) { | |
return (t,n)=>{ | |
try { | |
const n = window.sessionStorage.getItem("familyState") | |
, r = window.sessionStorage.getItem("familyCode") | |
, i = JSON.parse(n); | |
i && r ? (i.redux && t({ | |
type: "REHYDRATE_STATE", | |
value: i.redux | |
}), | |
i.uiState ? (i.uiState.code = r, | |
e && e(i.uiState)) : e && e({})) : e && e({}), | |
window.sessionStorage.removeItem("familyState"), | |
window.sessionStorage.removeItem("familyCode") | |
} catch (e) { | |
console.error(e) | |
} | |
} | |
} | |
function Q(e, t, n) { | |
return (r,i)=>Object(f.a)(r, i, null, !0).then(n=>{ | |
const r = i().resellerInfo.config.URL_FAMILY; | |
return n.Authorization = "Bearer " + e, | |
n["Reseller-Id"] = t, | |
delete n["Hardware-Id"], | |
w(r + "/v1/myself", n, !0) | |
} | |
).then(e=>r(a(e))).catch(e=>console.warn(e)).finally(()=>n && n()) | |
} | |
function Y(e, t, n, r) { | |
return (i,o)=>Object(f.a)(i, o, null, !0).then(r=>{ | |
const i = o().resellerInfo.config.URL_FAMILY; | |
return r.Authorization = "Bearer " + t, | |
r["Reseller-Id"] = n, | |
delete r["Hardware-Id"], | |
S(i + "/v1/myself", r, e) | |
} | |
).then(e=>new Promise(t=>setTimeout(()=>t(e), 1e3))).then(e=>i(a(e))).catch(e=>console.warn(e)).finally(()=>r && r()) | |
} | |
function Z(e) { | |
return (t,n)=>Object(f.a)(t, n, null, !1).then(e=>function(e, t) { | |
return _("fetchFamilyResellers", ()=>Object(h.a)(e, t)) | |
}(n().resellerInfo.config.URL_BOOKSHELF + "v1/familysharing/resellers", e)).then(e=>t(function(e) { | |
return { | |
type: "SET_FAMILY_RESELLERS", | |
value: e | |
} | |
}(e))).catch(e=>console.warn(e)).finally(()=>e && e()) | |
} | |
function $(e, t) { | |
return (n,r)=>Object(f.a)(n, r, null, !1).then(t=>function(e, t, n) { | |
return _("fetchFamilyAuthorizeUrl", ()=>new Promise((r,i)=>(t.client_type = v.NET.CLIENT_TYPE, | |
t.client_version = v.VERSION.OFFICIAL, | |
t.reseller_id = String(n), | |
v.NET.OAUTHSIM && (t.reseller_id = "1"), | |
Object(h.a)(e, t).then(e=>{ | |
const t = e.config; | |
v.NET.OAUTHSIM && (t.URL_OAUTH_REDIRECT = window.location.origin + location.pathname); | |
let i = ["client_id=" + t.OAUTH_CLIENT_ID, "response_type=code", "scope=" + encodeURIComponent(t.OAUTH_SCOPE_FAMILY || t.OAUTH_SCOPE), "redirect_uri=" + encodeURIComponent(t.URL_OAUTH_REDIRECT)]; | |
i = Object(y.a)(t, i); | |
let o = t.CHANNEL_ID; | |
return o && i.push("channelid=" + o), | |
r({ | |
resellerId: n, | |
resellerConfig: t, | |
redirectUri: t.URL_OAUTH_REDIRECT, | |
authUrl: t.URL_OAUTH_AUTHORIZATION + "?" + i.join("&") | |
}) | |
} | |
)))) | |
}(r().resellerInfo.config.URL_BOOKSHELF + "v2/resellerconfig", t, e)).then(e=>n(function(e) { | |
return { | |
type: "SET_MEMBER_OAUTH_CONFIG", | |
value: e | |
} | |
}(e))).catch(e=>console.warn(e)).finally(()=>t && t()) | |
} | |
function X(e, t, n) { | |
return (r,i)=>function(e, t) { | |
return _("fetchMemberToken", ()=>new Promise((n,r)=>{ | |
if (!e || !t) | |
return r("missing config or code"); | |
let i = ["client_id=" + encodeURIComponent(e.OAUTH_CLIENT_ID), "grant_type=authorization_code", "code=" + encodeURIComponent(t), "scope=" + encodeURIComponent(e.OAUTH_SCOPE_FAMILY || e.OAUTH_SCOPE), "redirect_uri=" + encodeURIComponent(e.URL_OAUTH_REDIRECT)]; | |
return i = Object(y.a)(e, i), | |
Object(h.a)(e.URL_OAUTH_ACCESSTOKEN, { | |
"Content-Type": "application/x-www-form-urlencoded" | |
}, "POST", 1e4, i.join("&")).then(e=>n(e)) | |
} | |
)) | |
}(P(i(), t).resellerConfig, e).then(e=>n && n(e.access_token)).catch(e=>console.warn(e)) | |
} | |
function J(e) { | |
return (t,n)=>{ | |
if (n().token.isDemo) | |
return e && e(); | |
const r = n().resellerInfo.config.URL_FAMILY; | |
return Object(f.a)(t, n, null, !0).then(e=>function(e, t) { | |
return _("fetchFamily", ()=>Object(h.a)(e, t).then(e=>(e || console.log(e), | |
e)).catch(e=>b)) | |
}(r + "/v1/family", e)).then(e=>t(o(e))).catch(e=>console.warn(e)).finally(()=>e && e()) | |
} | |
} | |
function ee(e, t, n) { | |
return (r,i)=>{ | |
const s = i().resellerInfo.config.URL_FAMILY; | |
return Object(f.a)(r, i, null, !0).then(n=>function(e, t, n, r) { | |
return _("updateFamily", ()=>new Promise((i,o)=>(v.NET.OAUTHSIM && (r = "1"), | |
Object(h.a)(e, t, "POST", 1e4, JSON.stringify({ | |
token: n, | |
resellerId: r | |
})).then(e=>{ | |
if (e) | |
return i(e); | |
o("Empty Response for Nickname") | |
} | |
).catch(e=>o(e))))) | |
}(s + "/v1/family", n, e, t)).then(e=>r(o(e))).catch(e=>console.warn(e)).finally(()=>n && n()) | |
} | |
} | |
function te(e, t) { | |
return (n,r)=>{ | |
const i = r().resellerInfo.config.URL_FAMILY; | |
return Object(f.a)(n, r, null, !0).then(t=>function(e, t) { | |
return _("removeFamilyMember", ()=>Object(h.a)(e, t, "DELETE")) | |
}(i + "/v1/family/members/" + e, t)).then(()=>setTimeout(()=>n(J()), 1e3)).catch(e=>console.warn(e)).finally(()=>t && t()) | |
} | |
} | |
function ne(e, t, n) { | |
return (r,i)=>{ | |
const o = i().resellerInfo.config.URL_FAMILY; | |
return Object(f.a)(r, i, null, !0).then(n=>function(e, t, n, r) { | |
return _("fetchIsMemberAllowed", ()=>new Promise((i,o)=>(v.NET.OAUTHSIM && (r = "1"), | |
Object(h.a)(e, t, "POST", 1e4, JSON.stringify({ | |
token: n, | |
resellerId: r | |
})).then(e=>{ | |
if (e) | |
return i(e); | |
o("Empty Response for Nickname") | |
} | |
).catch(e=>o(e))))) | |
}(o + "/v1/family/memberallowed", n, e, t)).then(e=>n && n(e)).catch(e=>n && n({ | |
allowed: !1, | |
reasons: [e] | |
})) | |
} | |
} | |
function re(e) { | |
return (t,n)=>{ | |
if (n().token.isDemo) | |
return; | |
const r = n().resellerInfo.config.URL_FAMILY; | |
return Object(f.a)(t, n, null, !0).then(t=>function(e, t, n) { | |
return _("fetchShares", ()=>new Promise((r,i)=>(n && (e += "?pubid=" + n), | |
Object(h.a)(e, t).then(e=>{ | |
if (!e) | |
return i("Missing shares"); | |
r(e) | |
} | |
)))) | |
}(r + "/v1/shares", t, e)).then(e=>t({ | |
type: "SET_SHARES_INFO", | |
value: e | |
})).catch(e=>console.warn(e)) | |
} | |
} | |
function ie(e, t, n=Function.prototype) { | |
const r = re(); | |
return (i,o)=>{ | |
const s = o().resellerInfo.config.URL_FAMILY + "/v1/shares"; | |
return Object(f.a)(i, o, null, !0).then(n=>function(e, t, n, r) { | |
return _("shareEntitlements", ()=>new Promise((i,o)=>{ | |
let s = []; | |
if (n.forEach(e=>r.forEach(t=>{ | |
s.push({ | |
receiver: e, | |
publicationId: t | |
}) | |
} | |
)), | |
!s.length) | |
return i(); | |
const a = { | |
shares: s | |
}; | |
return Object(h.a)(e, t, "POST", 1e4, JSON.stringify(a)).then(()=>{ | |
i() | |
} | |
).catch(e=>o(e)) | |
} | |
)) | |
}(s, n, e, t)).then(()=>r(i, o).finally(()=>n(!0))).catch(e=>n(!1, [e.message])) | |
} | |
} | |
function oe(e, t, n, r) { | |
return (i,o)=>{ | |
t || (t = I(o())); | |
const s = o().resellerInfo.config.URL_FAMILY; | |
return Object(f.a)(i, o, null, !0).then(r=>function(e, t, n, r, i) { | |
return _("unshareEntitlements", ()=>new Promise((o,s)=>{ | |
const a = []; | |
return n && n.length && n.forEach(e=>a.push("pubid=" + e)), | |
r && r.membershipId && a.push("receiver=" + r.membershipId), | |
i && i.membershipId && a.push("sharer=" + i.membershipId), | |
a.length && (e += "?" + a.join("&")), | |
Object(h.a)(e, t, "DELETE", 1e4).then(()=>{ | |
o() | |
} | |
).catch(e=>s(e)) | |
} | |
)) | |
}(s + "/v1/shares", r, e, t, n)).then(e=>r && r(!0)).catch(e=>r && r(!1, e.message)) | |
} | |
} | |
n("./musketeer/modules/_utils/typeof.ts"); | |
n("./node_modules/core-js/modules/es.array.reduce.js"); | |
n("./musketeer/modules/_utils/filterOutNullValues.ts"); | |
var se = n("./node_modules/lodash/lodash.js") | |
, ae = n.n(se); | |
function ue(e, t) { | |
if (e instanceof Array) | |
return ae.a.isEqual(e, t) ? e : t; | |
if (null === e || null === t || "object" != typeof e || "object" != typeof t) | |
return e === t ? e : t; | |
const n = {}; | |
let r = !1; | |
for (let i in t) { | |
const o = ue(e[i], t[i]); | |
o !== e[i] && (n[i] = o, | |
r = !0) | |
} | |
return r ? Object.assign({}, e, n) : e | |
} | |
const le = Object.freeze({}) | |
, ce = { | |
familyMember: null, | |
shares: le | |
} | |
, de = { | |
SET_SHARES_INFO: (e,t)=>function(e, t=[]) { | |
if (0 === t.length) | |
return e.shares === le ? e : { | |
...e, | |
shares: le | |
}; | |
let n = null; | |
const r = ()=>n || (n = Object.assign({}, e.shares)); | |
return Object.keys(e.shares).forEach(e=>{ | |
!t.some(t=>t.publicationId === e) && delete r()[e] | |
} | |
), | |
t.forEach(t=>{ | |
const n = t.publicationId; | |
ae.a.isEqual(t, e.shares[n]) || (r()[n] = t) | |
} | |
), | |
n ? { | |
...e, | |
shares: n | |
} : e | |
}(e, t.value), | |
SET_FAMILY: (e,t)=>ue(e, { | |
family: t.value | |
}), | |
SET_MYSELF: (e,t)=>ue(e, { | |
myself: t.value | |
}), | |
SET_FAMILY_MEMBER: (e,t)=>ue(e, { | |
familyMember: t.value | |
}), | |
SET_FAMILY_RESELLERS: (e,t)=>ue(e, { | |
resellers: t.value | |
}), | |
SET_MEMBER_OAUTH_CONFIG: (e,t)=>ue(e, { | |
oAuthConfig: { | |
[t.value.resellerId]: t.value | |
} | |
}), | |
CLEAR_FAMILY_MEMBER: e=>ue(e, { | |
familyMember: null | |
}), | |
REHYDRATE_STATE: (e,t)=>t.value ? t.value : e, | |
RESTORE_STATE: (e,t)=>t.value ? t.value : e, | |
PURGE_SETTINGS: ()=>ce | |
} | |
, fe = (e=ce,t)=>{ | |
const n = de[t.type]; | |
if (n) { | |
const r = n(e, t); | |
return r !== e && c(r), | |
r | |
} | |
return e | |
} | |
; | |
n("./musketeer/modules/familiy-sharing/views/unshare/index.js") | |
}, | |
"./musketeer/modules/familiy-sharing/utils.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "c", (function() { | |
return o | |
} | |
)), | |
n.d(t, "a", (function() { | |
return s | |
} | |
)), | |
n.d(t, "d", (function() { | |
return a | |
} | |
)), | |
n.d(t, "b", (function() { | |
return u | |
} | |
)); | |
var r = n("./node_modules/react/index.js") | |
, i = n("./node_modules/i18next/dist/esm/i18next.js"); | |
function o() { | |
const e = Object.create(null); | |
return function(t, n) { | |
return e[t] || (e[t] = n().finally(()=>delete e[t])) | |
} | |
} | |
function s(e, t) { | |
for (var n = Object.keys(e), r = new RegExp("OAUTH_X_(.*)_KEY"), i = 0; i < n.length; i++) | |
n[i].match(r) && t.push(e["OAUTH_X_" + RegExp.$1 + "_KEY"] + "=" + e["OAUTH_X_" + RegExp.$1 + "_VALUE"]); | |
return t | |
} | |
function a(e, t) { | |
const n = Object(r.useRef)(); | |
Object(r.useEffect)(()=>{ | |
n.current = e | |
} | |
, [e]), | |
Object(r.useEffect)(()=>{ | |
if (null !== t) { | |
let e = setInterval((function() { | |
n.current() | |
} | |
), t); | |
return ()=>clearInterval(e) | |
} | |
} | |
, [t]) | |
} | |
function u(e) { | |
const t = { | |
de_DE: /[sxzß]$/i, | |
en_US: /[s]$/i | |
}[i.a.language]; | |
return null != t && t.test(e) ? "genitiveSpecial" : "genitive" | |
} | |
}, | |
"./musketeer/modules/familiy-sharing/views/error/index.js": function(e, t, n) { | |
"use strict"; | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./node_modules/react/index.js"), s = n.n(o), a = n("./node_modules/react-i18next/dist/es/Translation.js"), u = n("./musketeer/components/UIButton/index.js"), l = n("./musketeer/components/UIPrimitives/index.js"), c = n("./musketeer/components/UITools/index.js"), d = n("./musketeer/components/UIImage/index.ts"), f = n.p + "musketeer/modules/familiy-sharing/assets/error.png"; | |
function h(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
t.a = Object(i.e)(Object(i.c)((function(e) { | |
const t = e.theme | |
, n = t.variables | |
, r = (t.colors, | |
t.mixins); | |
return { | |
bodyContent: Object.assign({ | |
alignItems: "center", | |
display: "flex", | |
flex: 1, | |
flexDirection: "column", | |
justifyContent: "center", | |
paddingBottom: 4 * n.basicUnit, | |
paddingTop: 4 * n.basicUnit | |
}, r.scrollable(), r.globalPaddingHelper()), | |
additionalImageStyles: { | |
maxWidth: "90%" | |
}, | |
headerText: { | |
fontWeight: "bold", | |
fontSize: 42, | |
lineHeight: n.lineHeight, | |
marginTop: 25, | |
textAlign: "center", | |
padding: "0 10%" | |
}, | |
subText: { | |
fontSize: 20, | |
lineHeight: n.lineHeight, | |
textAlign: "center" | |
}, | |
subTextWrapper: { | |
display: "flex", | |
flexDirection: "column", | |
marginTop: 10, | |
marginBottom: 23 | |
}, | |
buttonContainer: { | |
alignItems: "center", | |
display: "flex" | |
}, | |
button: { | |
marginLeft: n.basicUnit / 2, | |
marginRight: n.basicUnit / 2 | |
} | |
} | |
} | |
))((function(e) { | |
const {styles: t, reasons: n, nickname: r, onContinue: i, onClose: o, isAbort: p} = e; | |
return h(a.a, {}, void 0, e=>s.a.createElement(l.h, c.b.getStylesForPlatform(t.bodyContent), h(d.a, { | |
src: f, | |
additionalStyles: t.additionalImageStyles | |
}), s.a.createElement(l.c, c.b.getStylesForPlatform(t.headerText), e(p ? "You want to quit?!" : "Something went wrong")), s.a.createElement(l.h, c.b.getStylesForPlatform(t.subTextWrapper), s.a.createElement(l.c, c.b.getStylesForPlatform(t.subText), e(function(e) { | |
const t = { | |
"already-member-in-family": "You are already a member of a family You can only belong to one family", | |
"family-members-max": "There is no more space in this family The maximum number of 6 members has been reached", | |
"handshake-with-invitee": "There is a conflict with one of your linked libraries", | |
"invitee-of-another-family-time-period": "You were already a member of a family You can join another family after a period of one year", | |
"receiver-already-has-book": "{{nickname}} already owns this book", | |
genericError: "This service is currently unavailable due to technical problems", | |
"user-abort": "If you want to continue later simply start family sharing again to continue where you left off" | |
}; | |
return t[Object.keys(t).find(t=>e && e.find(e=>e.includes(t)))] || t.genericError | |
}(n), { | |
nickname: r | |
}))), s.a.createElement(l.h, c.b.getStylesForPlatform(t.buttonContainer), p && h(u.a, { | |
text: e("Continue"), | |
type: "raised", | |
typeVariant: "small", | |
onClick: ()=>i && i(), | |
className: t.button | |
}), h(u.a, { | |
text: e(p ? "Quit process" : "Close"), | |
type: "raised", | |
typeVariant: "small", | |
onClick: ()=>o && o(), | |
className: t.button | |
})))) | |
} | |
))) | |
}, | |
"./musketeer/modules/familiy-sharing/views/unshare/index.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
var r, i = n("./node_modules/react-fela/es/index.js"), o = n("./node_modules/react/index.js"), s = n.n(o), a = n("./node_modules/react-i18next/dist/es/useTranslation.js"), u = n("./node_modules/postal/lib/postal.js"), l = n.n(u), c = n("./musketeer/components/UILabel/index.js"), d = n("./musketeer/components/UIListItem/index.js"), f = n("./musketeer/components/UIList/index.js"), h = n("./musketeer/components/UIPrimitives/index.js"), p = n("./musketeer/components/UIDialog/index.js"), m = n("./musketeer/components/UIActivityIndicator/index.js"), b = n("./musketeer/modules/familiy-sharing/views/error/index.js"), g = n("./musketeer/components/UITools/index.js"), y = n("./node_modules/react-redux/es/index.js"), v = n("./musketeer/modules/familiy-sharing/index.js"); | |
function _(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
Object.freeze(Object.create(null)); | |
const w = { | |
showDialog: !1, | |
shareSuccesful: !1, | |
errorMessage: void 0, | |
currentEntitlementId: void 0, | |
sharer: void 0, | |
receivers: [], | |
receiver: void 0, | |
isLoading: !1 | |
} | |
, S = l.a.channel("app") | |
, E = []; | |
function j(e, t) { | |
return t ? { | |
...e, | |
...t | |
} : e | |
} | |
var x = function(e) { | |
const [t,n] = Object(o.useReducer)(j, w) | |
, {styles: r} = e | |
, i = Object(y.c)() | |
, {t: u} = Object(a.a)(); | |
Object(o.useEffect)(()=>(E.push(S.subscribe("rx.unshare", ({id: e, receivers: t, sharer: r})=>{ | |
n({ | |
showDialog: !0, | |
currentEntitlementId: e, | |
receivers: t, | |
sharer: r, | |
receiver: 1 === t.length && t[0] | |
}) | |
} | |
)), | |
()=>{ | |
l.a.unsubscribe.apply(l.a, E) | |
} | |
), []); | |
const x = ()=>{ | |
n(w) | |
} | |
, O = (e,t)=>{ | |
e ? (i(Object(v.j)()), | |
x()) : n({ | |
isLoading: !1, | |
errorMessage: t | |
}) | |
} | |
; | |
return _(s.a.Fragment, {}, void 0, t.isLoading && _(m.a, { | |
useModalBlocker: !0 | |
}), !t.isLoading && _(p.a, { | |
visible: t.showDialog, | |
title: !t.errorMessage && u("Stop sharing"), | |
onRequestClose: x, | |
buttons: t.receiver && !t.errorMessage ? [{ | |
text: u("Cancel"), | |
onClick: x | |
}, { | |
text: u("Stop sharing"), | |
type: "raised", | |
onClick: ()=>{ | |
n({ | |
isLoading: !0 | |
}), | |
i(Object(v.B)([t.currentEntitlementId], t.receiver, t.sharer, O)) | |
} | |
}] : [] | |
}, void 0, t.errorMessage && _(b.a, { | |
reasons: t.error, | |
onClose: x | |
}), !t.errorMessage && !t.receiver && t.receivers.length > 0 && _(f.a, {}, void 0, t.receivers.map((e,t)=>_(d.a, { | |
icon: "arrow-right", | |
iconAlign: "right", | |
onClick: ()=>n({ | |
receiver: e | |
}) | |
}, t, s.a.createElement(h.h, Object(g.d)(r.listItem), s.a.createElement(h.h, Object(g.d)(r.nameAbbreviation), s.a.createElement(h.c, Object(g.d)(r.nameAbbreviationText), e.nickname[0], " ")), _(h.h, {}, void 0, e.nickname))))), !t.errorMessage && t.receiver && _(c.b, {}, void 0, u("{{nickname}} will loose all access to the book you are sharing", { | |
nickname: t.receiver.nickname | |
})))) | |
}; | |
const O = Object(i.e)(Object(i.c)((function(e) { | |
const t = e.theme | |
, n = t.colors | |
, r = t.variables | |
, i = { | |
paddingLeft: 2 * r.basicUnit, | |
paddingRight: 2 * r.basicUnit | |
}; | |
return { | |
listItem: { | |
display: "flex" | |
}, | |
nameAbbreviation: { | |
display: "flex", | |
justifyContent: "center", | |
alignItems: "center", | |
width: 24, | |
height: 27, | |
borderRadius: "50%", | |
marginRight: 12, | |
border: "1px solid " + n.accent | |
}, | |
nameAbbreviationText: { | |
color: n.accent | |
}, | |
textContainerSuccess: Object.assign(i, { | |
flexWrap: "wrap", | |
justifyContent: "center", | |
flexDirection: "row" | |
}), | |
textContainerError: Object.assign(i, { | |
display: "flex" | |
}), | |
text: {} | |
} | |
} | |
))(x)); | |
t.default = O | |
}, | |
"./musketeer/modules/tolino-audiobook/actions.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "b", (function() { | |
return o | |
} | |
)), | |
n.d(t, "a", (function() { | |
return s | |
} | |
)), | |
n.d(t, "c", (function() { | |
return a | |
} | |
)), | |
n.d(t, "e", (function() { | |
return u | |
} | |
)), | |
n.d(t, "d", (function() { | |
return l | |
} | |
)); | |
var r = n("./musketeer/modules/tolino-cloud/index.js"); | |
const i = window.tolino.config | |
, o = "SET_PLAYLIST" | |
, s = "RESET_PLAYLIST" | |
, a = "SET_TRACK_INFO"; | |
function u(e) { | |
const t = new Array(e.audioInfos.tracks || 0).fill({}); | |
return console.assert(t.length > 0, "Warning : Emtpy audiobook !"), | |
n=>{ | |
n({ | |
type: o, | |
value: { | |
tracks: t, | |
entitlement: e | |
} | |
}) | |
} | |
} | |
function l(e) { | |
return function(t, n) { | |
const o = n().playlist.entitlement; | |
if (!o) | |
return Promise.reject(new Error(i.ERROR.APP_NO_ENTITLEMENT)); | |
const s = { | |
pId: o.publicationId, | |
dId: o.id, | |
trackNo: e | |
}; | |
return Object(r.f)(t, n, s).then(n=>(t({ | |
type: a, | |
value: { | |
trackNo: e, | |
info: n | |
} | |
}), | |
n)) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-cloud/actions.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "d", (function() { | |
return o | |
} | |
)), | |
n.d(t, "c", (function() { | |
return s | |
} | |
)), | |
n.d(t, "b", (function() { | |
return a | |
} | |
)), | |
n.d(t, "a", (function() { | |
return u | |
} | |
)), | |
n.d(t, "j", (function() { | |
return l | |
} | |
)), | |
n.d(t, "g", (function() { | |
return c | |
} | |
)), | |
n.d(t, "f", (function() { | |
return d | |
} | |
)), | |
n.d(t, "e", (function() { | |
return f | |
} | |
)), | |
n.d(t, "m", (function() { | |
return h | |
} | |
)), | |
n.d(t, "k", (function() { | |
return p | |
} | |
)), | |
n.d(t, "l", (function() { | |
return m | |
} | |
)), | |
n.d(t, "i", (function() { | |
return b | |
} | |
)), | |
n.d(t, "h", (function() { | |
return g | |
} | |
)); | |
var r = n("./musketeer/modules/async-storage/index.js"); | |
const i = window.tolino.config | |
, o = "SET_INVENTORY_ISFETCHING" | |
, s = "SET_ENTITLEMENTS" | |
, a = "SET_ENTITLEMENT" | |
, u = "PURGE_ENTITLEMENTS"; | |
function l(e) { | |
return { | |
type: a, | |
value: e | |
} | |
} | |
function c() { | |
return { | |
type: o, | |
value: !0 | |
} | |
} | |
function d(e) { | |
return { | |
type: s, | |
value: e | |
} | |
} | |
function f(e) { | |
return { | |
type: s, | |
value: { | |
entitlements: e.entitlements, | |
lastModified: e.time, | |
pendingRequests: e.nextPage || 0, | |
deleted: e.deleted | |
} | |
} | |
} | |
function h(e, t) { | |
return { | |
type: "SET_ENTITLEMENT_TITLE", | |
value: t, | |
id: e | |
} | |
} | |
function p(e, t) { | |
return { | |
type: "SET_ENTITLEMENT_AUTHOR", | |
value: t, | |
id: e | |
} | |
} | |
function m(e, t) { | |
return { | |
type: "SET_ENTITLEMENT_COVER", | |
value: t, | |
id: e | |
} | |
} | |
function b(e, t) { | |
return { | |
type: "SET_CLIENT_DATA", | |
clientData: t, | |
id: e | |
} | |
} | |
function g(e) { | |
return (t,n)=>{ | |
t({ | |
type: "SET_BOOKMARK", | |
value: e | |
}), | |
n().user.userId && r.a.setItem("bookshelf", n().inventory, i.BOOKSHELFSTORE) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-cloud/bookshelf.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return _ | |
} | |
)), | |
n.d(t, "b", (function() { | |
return w | |
} | |
)); | |
var r = n("./musketeer/modules/async-storage/index.js") | |
, i = n("./musketeer/modules/tolino-cloud/bookshelf.worker.js") | |
, o = n.n(i) | |
, s = n("./musketeer/modules/tolino-cloud/headers.js") | |
, a = n("./musketeer/modules/tolino-cloud/util.js") | |
, u = n("./musketeer/modules/tolino-shared/index.js") | |
, l = n("./musketeer/modules/tolino-oauth/actions.js") | |
, c = n("./musketeer/modules/tolino-cloud/index.js") | |
, d = n("./musketeer/modules/tolino-user/actions.js"); | |
const f = window.tolino.config; | |
let h = !1; | |
var p = n("./musketeer/modules/tolino-cloud/actions.js") | |
, m = n("./musketeer/modules/familiy-sharing/index.js"); | |
const b = window.tolino.config | |
, g = { | |
entitlements: [], | |
lastModified: 0, | |
requests: [], | |
deleted: [] | |
} | |
, y = o()(); | |
y.addEventListener("message", (function(e) { | |
var t = e.data; | |
if (t) | |
switch (t.request) { | |
case "full-inventory": | |
case "delta-inventory": | |
const {dispatch: e, getState: n} = v[t.request]; | |
if (t.nextPage && t.nextPage < 0 && delete v[t.request], | |
t.error) | |
return async function(e, t, n) { | |
const r = e && e.details && e.details.status | |
, i = e.details && e.details.response && e.details.response.ResponseInfo && e.details.response.ResponseInfo.responseStatus; | |
switch (r) { | |
case -1: | |
case 0: | |
case 400: | |
case 403: | |
break; | |
case 401: | |
if (await Object(l.i)(), | |
!h) | |
return h = !0, | |
Object(c.d)(t, n); | |
console.error("No valid token after refresh. Giving up ..."); | |
break; | |
case 406: | |
break; | |
case 500: | |
if (n().token.isDemo && !h) { | |
h = !0; | |
try { | |
Object(d.e)(f.NET.DEMO_HARDWARE, n()).then(()=>Object(c.d)(t, n)) | |
} catch (e) { | |
console.log("ISsue"), | |
console.error(e) | |
} | |
} | |
} | |
switch (i) { | |
case -100: | |
case -104: | |
if (await Object(l.i)(), | |
!h) | |
return h = !0, | |
Object(c.d)(t, n); | |
case -115: | |
case -120: | |
break; | |
case -204: | |
case -205: | |
case -206: | |
break; | |
case -500: | |
case -1: | |
case -503: | |
console.error(i + "<- BOSH ERROR") | |
} | |
}(t, e, n); | |
t.entitlements && (e(Object(p.e)(t)), | |
S(t.entitlements, e)), | |
n().user.userId && r.a.setItem("bookshelf", n().inventory, b.BOOKSHELFSTORE), | |
e(Object(m.j)()); | |
break; | |
default: | |
console.warn("unknown request from worker", t) | |
} | |
} | |
)); | |
const v = {}; | |
async function _(e, t) { | |
return e(Object(p.g)()), | |
function(e, t) { | |
return t().user.userId ? r.a.getItem("bookshelf", b.BOOKSHELFSTORE).then(t=>t ? (e({ | |
type: "SET_SUBSCRIPTION_INFO", | |
subscriptionInfo: t.subscriptions | |
}), | |
e(Object(p.f)({ | |
...g, | |
...t | |
})), | |
S(t.entitlements, e, t.subscriptions), | |
t) : (console.info("getLocalInventory: no local bookshelf"), | |
g)).catch(e=>(console.info("getLocalInventory:", e.message), | |
g)) : Promise.resolve(null) | |
}(e, t).then(n=>function(e, t, n) { | |
return Object(s.a)(e, t).catch(i=>(console.error("fetchRequestHeaders:", i.message), | |
e(Object(p.e)(n)), | |
t().user.userId && r.a.setItem("bookshelf", t().inventory, b.BOOKSHELFSTORE), | |
null)) | |
}(e, t, n)).then(n=>{ | |
const r = t() | |
, i = r.inventory.lastModified || 0 | |
, o = i ? "delta-inventory" : "full-inventory"; | |
n && !v[o] && (v[o] = { | |
dispatch: e, | |
getState: t | |
}, | |
y.postMessage({ | |
lastModified: i, | |
request: o, | |
header: n, | |
config: r.resellerInfo.config | |
})) | |
} | |
) | |
} | |
async function w(e) { | |
await r.a.removeItem("bookshelf", b.BOOKSHELFSTORE), | |
await r.a.clear(b.BOOKSHELFSTORE), | |
e({ | |
type: p.a | |
}) | |
} | |
function S(e, t, n) { | |
const r = {}; | |
Object.values(e).forEach(e=>{ | |
e.subscriptionId && (r[e.subscriptionId] = !0) | |
} | |
); | |
for (let e in r) | |
n && n[e] || t(E(e)) | |
} | |
function E(e, t) { | |
const n = E.fetchPromise | |
, r = E.lastFetchSuccess | |
, i = E.subscriptionInfo | |
, o = ()=>{ | |
delete n[e] | |
} | |
, l = t=>{ | |
o(), | |
console.warn('Fetch subscription info failed for "%s"', e, msg) | |
} | |
; | |
return (c,d)=>{ | |
if (!e) | |
return Promise.reject("Invalid subscription identifier"); | |
if (!t && r[e] && e in i && u.r.getTime() <= r[e] + 36e5) | |
return c({ | |
type: "SET_SUBSCRIPTION_INFO", | |
subscriptionInfo: i | |
}), | |
Promise.resolve(i[e]); | |
if (n[e]) | |
return n[e]; | |
function f(t) { | |
return o(), | |
t && t.SubscriptionInfo ? (i[e] = t.SubscriptionInfo, | |
r[e] = u.r.getTime(), | |
c({ | |
type: "SET_SUBSCRIPTION_INFO", | |
subscriptionInfo: i | |
}), | |
i[e]) : (console.warn("Missing subscription info for ID", e), | |
i[e] = null) | |
} | |
return n[e] = Object(s.a)(c, d).then(t=>{ | |
const n = d().resellerInfo.config | |
, r = n.URL_BOOKSHELF + "subscriptions/" + e; | |
return t.client_type = n.client_type, | |
Object(a.a)(r, t).then(f, l) | |
} | |
) | |
} | |
} | |
E.fetchPromise = {}, | |
E.lastFetchSuccess = {}, | |
E.subscriptionInfo = {} | |
}, | |
"./musketeer/modules/tolino-cloud/bookshelf.worker.js": function(e, t, n) { | |
e.exports = function() { | |
return new Worker(n.p + "bookshelf.worker.js") | |
} | |
}, | |
"./musketeer/modules/tolino-cloud/headers.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return s | |
} | |
)); | |
var r = n("./musketeer/modules/tolino-oauth/actions.js"); | |
const i = window.tolino.config; | |
function o(e, t) { | |
if (!e.resellerInfo || !e.resellerInfo.config) | |
return console.warn("getHeaders: missing reseller configuration", e.resellerInfo), | |
Promise.reject("NO_RESELLER_CONFIG"); | |
const n = { | |
Accept: "application/json", | |
"Content-Type": "application/json" | |
}; | |
return t ? Promise.resolve(Object.assign({ | |
"Reseller-Id": e.resellerInfo.config.reseller_id, | |
Authorization: "Bearer " + e.token.access, | |
"Hardware-Id": e.token.isDemo ? i.NET.DEMO_HARDWARE : e.user.hardwareId | |
}, n)) : Promise.resolve(Object.assign({ | |
reseller_id: e.resellerInfo.config.reseller_id, | |
t_auth_token: e.token.access, | |
hardware_id: e.token.isDemo ? i.NET.DEMO_HARDWARE : e.user.hardwareId | |
}, n)) | |
} | |
function s(e, t, n, i) { | |
if (!e || !t) | |
return Promise.reject("MISSING_PARAMETERS"); | |
const s = t() | |
, a = s.user.userId && s.token.isDemo | |
, u = Date.now() + 12e4 >= s.token.expireTime; | |
return a || u ? Object(r.i)(e, t, n).then(()=>o(t(), i)) : o(s, i) | |
} | |
}, | |
"./musketeer/modules/tolino-cloud/index.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "d", (function() { | |
return S | |
} | |
)), | |
n.d(t, "b", (function() { | |
return E | |
} | |
)), | |
n.d(t, "i", (function() { | |
return j | |
} | |
)), | |
n.d(t, "f", (function() { | |
return x | |
} | |
)), | |
n.d(t, "h", (function() { | |
return O | |
} | |
)), | |
n.d(t, "c", (function() { | |
return M | |
} | |
)), | |
n.d(t, "e", (function() { | |
return k | |
} | |
)), | |
n.d(t, "a", (function() { | |
return A | |
} | |
)), | |
n.d(t, "k", (function() { | |
return C | |
} | |
)), | |
n.d(t, "g", (function() { | |
return I | |
} | |
)), | |
n.d(t, "j", (function() { | |
return R | |
} | |
)); | |
n("./node_modules/core-js/modules/web.url.js"); | |
var r = n("./node_modules/postal/lib/postal.js") | |
, i = n.n(r) | |
, o = n("./musketeer/modules/tolino-shared/index.js"); | |
const s = { | |
EBOOK: "?size=BS-B03", | |
EPAPER: "?size=BS-P11", | |
EMAGAZINE: "?size=BS-M11", | |
AUDIOBOOK: "?size=WS-B04" | |
} | |
, a = ["ebook", "emagazine", "edata", "epaper", "audiobook"] | |
, u = {} | |
, l = o.j.MISC.PROTECTION_TYPE; | |
function c(e, t) { | |
var n = e.protectionType | |
, r = e.ext_data || u | |
, i = "acs_encrypted"in r && parseInt(r.acs_encrypted, 10); | |
return "ACS4" === n && 1 === i ? l.ACS4 : "ACS4" === n && 0 === i ? l.TDRM : !t.contentEncrypted && i ? l.ACS4 : "application/epub+zip" === e.format && t.contentEncrypted ? l.NONE : e.format.indexOf("vnd") > -1 ? l.ACSM : e.protectionType | |
} | |
function d(e, t) { | |
if (e && e.ext_data && "default" === e.ext_data.cover) | |
return null; | |
switch (e.type) { | |
case "EBOOK": | |
case "AUDIOBOOK": | |
return f(e.fileResource, t.fileResource, s[e.type]); | |
case "EPAPER": | |
case "EMAGAZINE": | |
return f(t.fileResource, e.fileResource, s[e.type]); | |
case "EDATA": | |
return f(e.fileResource, t.fileResource) | |
} | |
return "" | |
} | |
function f(e, t, n) { | |
const r = e ? e.length : 0 | |
, i = t ? t.length : 0; | |
for (let t = 0; t < r; t++) | |
if ("SCALEDCOVER" === e[t].type) | |
return e[t].resource + n; | |
for (let e = 0; e < i; e++) | |
if ("SCALEDCOVER" === t[e].type) | |
return t[e].resource + n; | |
for (let t = 0, i = r; t < i; t++) | |
if ("COVER_IMAGE" === e[t].type) | |
return e[t].resource + n; | |
for (let t = 0; t < r; t++) | |
if ("FRONTCOVERIMAGE" === e[t].type) | |
return e[t].resource | |
} | |
function h(e) { | |
const t = e.epubMetaData | |
, n = t.ext_data | |
, r = t.deliverable | |
, i = "AUDIOBOOK" === t.type; | |
return r.map(r=>{ | |
let o = null; | |
return i && (o = { | |
tracks: r.tracks, | |
speaker: r.speaker, | |
reader: r.reader, | |
duration: r.duration, | |
bitrate: r.bitrate | |
}), | |
{ | |
author: p(t.author), | |
audioInfos: o, | |
bookmark: u, | |
clientData: { | |
isAvailableOffline: !1, | |
isFinished: !1, | |
isSynced: !1, | |
hasUnsupportedFeat: !1 | |
}, | |
comments: [], | |
coverURI: d(t, r), | |
description: r.descAbstract || t.descAbstract, | |
dogears: [], | |
id: r.identifier, | |
isbn: t.isbn, | |
isSample: r.preview, | |
issueDate: r.issued, | |
isTTSEnabled: n && n.text_to_speech && JSON.parse(n.text_to_speech), | |
keywords: r.keyword, | |
protectionType: c(t, r), | |
publicationId: t.identifier, | |
publisher: t.publisher, | |
purchaseDate: r.purchased, | |
reseller: { | |
id: e.resellerId, | |
name: e.resellerName | |
}, | |
series: { | |
title: null, | |
episodeNo: 0 | |
}, | |
subscriptionId: n && n.subscriptionId, | |
subtitle: r.subtitle, | |
tags: [], | |
title: r.title, | |
transactionId: n && n.transaction_id, | |
type: { | |
category: t.type, | |
fileType: r.contentFormat, | |
specVersion: r.epubVersion | |
} | |
} | |
} | |
) | |
} | |
function p(e) { | |
return !e || Object.values(e[0]).every(e=>null === e || "" === e) ? new Array({ | |
name: "" | |
}) : e | |
} | |
var m = { | |
createSideLoadedEntitlement: function(e) { | |
return { | |
author: "string" == typeof e.author ? new Array({ | |
name: e.author ? e.author : "" | |
}) : p(e.author), | |
bookmark: u, | |
clientData: { | |
isAvailableOffline: !1, | |
isFinished: !1, | |
isSynced: !1, | |
hasUnsupportedFeat: !1 | |
}, | |
comments: [], | |
coverURI: null, | |
description: "", | |
dogears: [], | |
id: e.deliverableId, | |
isbn: "", | |
isSample: !1, | |
issueDate: e.issued, | |
isTTSEnabled: !1, | |
keywords: null, | |
protectionType: l.NONE, | |
publicationId: e.deliverableId, | |
publisher: e.publisher, | |
purchaseDate: e.issued || o.r.getTime(), | |
reseller: { | |
id: 1, | |
name: "tolino" | |
}, | |
series: { | |
title: null, | |
episodeNo: 0 | |
}, | |
subscriptionId: null, | |
subtitle: e.subtitle, | |
tags: [], | |
title: e.title, | |
transactionId: null, | |
type: { | |
category: "EDATA", | |
fileType: e.format, | |
specVersion: e.epubVersion | |
} | |
} | |
}, | |
parseBoshPublications: function(e) { | |
const t = e && e.PublicationInventory; | |
if (!t) | |
return null; | |
let n = []; | |
a.forEach(e=>{ | |
(t[e] || []).forEach(e=>{ | |
e && (n = [...n, ...h(e)]) | |
} | |
) | |
} | |
); | |
const r = {}; | |
return n.forEach(e=>{ | |
r[e.id] = e | |
} | |
), | |
r | |
} | |
} | |
, b = n("./musketeer/modules/tolino-cloud/bookshelf.js") | |
, g = n("./musketeer/modules/tolino-cloud/headers.js") | |
, y = n("./musketeer/modules/tolino-cloud/util.js"); | |
const v = window.tolino.config | |
, _ = i.a.channel("app") | |
, w = {}; | |
function S(e, t) { | |
return Object(b.a)(e, t) | |
} | |
function E(e) { | |
return !!w[e] && (w[e].isAborted = !0, | |
w[e].xhr.abort(), | |
!0) | |
} | |
function j(e, t, {url: n, isBosh: r, progressHandler: i}) { | |
if (w[n]) | |
return w[n].promise; | |
function o() { | |
const e = w[n].xhr; | |
e.onload = e.onprogress = e.onabort = e.onerror = null, | |
w[n].xhr = null, | |
delete w[n] | |
} | |
return w[n] = { | |
isAborted: !1, | |
xhr: null, | |
promise: null | |
}, | |
w[n].promise = new Promise((s,a)=>{ | |
const u = new XMLHttpRequest; | |
return w[n].xhr = u, | |
u.open("GET", n, !0), | |
function(n) { | |
return r ? Object(g.a)(e, t).then(e=>{ | |
Object.keys(e).forEach(t=>n.setRequestHeader(t, e[t])) | |
} | |
) : Promise.resolve() | |
}(u).then(()=>{ | |
u.responseType = "arraybuffer", | |
u.onprogress = function(e) { | |
const t = w[n]; | |
t && !t.isAborted && i && e.lengthComputable && i(e.loaded, e.total) | |
} | |
, | |
u.onload = function() { | |
u.status < 400 ? s(u.response) : a(u), | |
o() | |
} | |
, | |
u.onabort = u.onerror = function() { | |
const e = w[n].isAborted ? v.ERROR.ABORT : v.ERROR.NETWORK_FAIL; | |
o(), | |
a(new Error(e)) | |
} | |
, | |
u.send() | |
} | |
).catch(e=>{ | |
o(), | |
a(e.message) | |
} | |
) | |
} | |
) | |
} | |
function x(e, t, {pId: n, dId: r, trackNo: i}) { | |
return n && r ? Object(g.a)(e, t, { | |
isErrorDialogEnabled: !0 | |
}).then(e=>{ | |
const o = `${t().resellerInfo.config.URL_BOOKSHELF}cloud/downloadinfo/${btoa(n)}/${btoa(r)}/type/HTML5` + (i ? "?trackNo=" + i : ""); | |
return Object(y.a)(o, e, "GET").then(e=>e && e.DownloadInfo) | |
} | |
) : Promise.reject(new Error(v.ERROR.APP_NO_ENTITLEMENT)) | |
} | |
async function O(e, t, n, r) { | |
return Object(g.a)(e, t).then(e=>{ | |
const i = t().resellerInfo.config | |
, o = i.URL_BOOKSHELF + "sync-data?paths=publications,audiobooks"; | |
return e.client_type = i.client_type, | |
Object(y.a)(o, e, "PATCH", 60, JSON.stringify({ | |
revision: n, | |
patches: r | |
})) | |
} | |
) | |
} | |
function M(e) { | |
return console.assert(e instanceof Array, "entitlementIDs should be an array of entitlement identifiers"), | |
(t,n)=>{ | |
const r = e=>t({ | |
type: "DELETE_ENTITLEMENT", | |
id: e | |
}); | |
return Object(g.a)(t, n).then(t=>{ | |
const i = n().resellerInfo.config; | |
t.client_type = i.client_type; | |
const o = e.map(e=>{ | |
const o = n().inventory.entitlements[e]; | |
if (!o) | |
return console.warn('Delete: Entitlement with ID "%s" not found in local inventory!', e), | |
Promise.resolve(); | |
const s = i.URL_BOOKSHELF + "deletecontent?deliverableId=" + encodeURIComponent(e) + (o.transactionId ? "&transaction_id=" + encodeURIComponent(o.transactionId) : ""); | |
return Object(y.a)(s, t).then(()=>r(e), t=>((e,t)=>{ | |
const n = t && t.responseStatus; | |
console.warn('Remote delete failed for "%s" (%s): %s', e, n, t ? t.message : ""), | |
-72 !== n && -307 !== n || r(e) | |
} | |
)(e, t.ResponseInfo)) | |
} | |
); | |
return Promise.all(o) | |
} | |
) | |
} | |
} | |
async function k(e, t, n) { | |
if (!n) | |
throw new Error(v.ERROR.APP_NO_ENTITLEMENT); | |
if (w[n.id]) | |
return w[n.id]; | |
w[n.id] = !0; | |
const r = await Object(g.a)(e, t, { | |
isErrorDialogEnabled: !0 | |
}) | |
, i = t().resellerInfo.config.URL_BOOKSHELF + "cloud/downloadinfo/" + btoa(n.publicationId) + "/" + btoa(n.id) + "/type/external-download"; | |
let o; | |
try { | |
o = await Object(y.a)(i, r, "GET") | |
} catch (e) { | |
throw console.error(e), | |
delete w[n.id], | |
v.ERROR.NETWORK_FAIL | |
} | |
if (!w[n.id]) | |
throw new Error(v.ERROR.ABORT); | |
const s = o && o.DownloadInfo; | |
return "bosh" !== s.location ? { | |
format: s.format, | |
url: s.contentUrl, | |
key: null, | |
location: s.location | |
} : new Promise((e,t)=>{ | |
var i = new XMLHttpRequest; | |
i.open("GET", s.contentUrl, !0), | |
i.setRequestHeader("t_auth_token", r.t_auth_token), | |
i.setRequestHeader("hardware_id", r.hardware_id), | |
i.setRequestHeader("reseller_id", r.reseller_id), | |
i.responseType = "blob", | |
i.overrideMimeType(s.format), | |
i.onprogress = function(e) { | |
w[n.id] || i.abort(), | |
e.lengthComputable && _.publish("rx.downloader.progress", { | |
id: n.id, | |
loaded: e.loaded, | |
total: e.total | |
}) | |
} | |
, | |
i.onload = function() { | |
e(i.response), | |
delete w[n.id], | |
i = null | |
} | |
, | |
i.onabort = function() { | |
t(v.ERROR.ABORT), | |
delete w[n.id], | |
i = null | |
} | |
, | |
i.onerror = function() { | |
t(v.ERROR.NETWORK_FAIL), | |
delete w[n.id], | |
i = null | |
} | |
, | |
i.send(null) | |
} | |
).then(e=>({ | |
key: s.contentUrl, | |
format: s.format, | |
url: URL.createObjectURL(e), | |
blob: e, | |
location: s.location | |
})) | |
} | |
function A(e) { | |
return !!e && (delete w[e], | |
!0) | |
} | |
async function C(e, t, {file: n, fileName: r, pubRef: i}) { | |
return w[r] || (w[r] = {}, | |
w[r].promise = new Promise(async(o,s)=>{ | |
w[r].resolve = o, | |
w[r].reject = s; | |
const a = !i | |
, u = a ? "upload" : "cover" | |
, l = t().resellerInfo.config.URL_BOOKSHELF + u | |
, c = (d = n.size, | |
3e4 + Math.round(40 * d / 1024)); | |
var d; | |
const f = await Object(g.a)(e, t); | |
delete f["Content-Type"]; | |
const h = Object(y.b)(n, r, i); | |
try { | |
const e = await Object(y.a)(l, f, "POST", c, h); | |
if (e) { | |
const {resolve: t} = w[r]; | |
t(a ? m.createSideLoadedEntitlement(e.metadata) : null), | |
delete w[r] | |
} | |
} catch (e) { | |
return console.warn("uploadBlob:", r, e), | |
delete w[r], | |
s(new Error(v.ERROR.NETWORK_BOSH_FAIL)) | |
} | |
} | |
)), | |
w[r].promise | |
} | |
async function I(e, t, {id: n, count: r, type: i}) { | |
let o = "?count=" + r; | |
if (!/^(ebook|epaper|emagazine|audiobook)$/.test(i)) | |
throw new Error("wrong type"); | |
o += "&type=" + i; | |
const s = t().resellerInfo.config.URL_BOOKSHELF + "recommendation/" + encodeURIComponent(n) + o | |
, a = await Object(g.a)(e, t); | |
let u; | |
try { | |
u = await Object(y.a)(s, a, "GET", 60) | |
} catch (e) { | |
throw console.error(e), | |
new Error(v.ERROR.NETWORK_FAIL) | |
} | |
let l = []; | |
return u && u.recommendationResponse && u.recommendationResponse.recommendations && (l = u.recommendationResponse.recommendations), | |
l | |
} | |
async function R(e, t, n) { | |
const r = await Object(g.a)(e, t) | |
, i = t().resellerInfo.config.URL_BOOKSHELF + "meta/?deliverableId=" + n.id; | |
let o; | |
try { | |
const e = await fetch(i, { | |
method: "GET", | |
headers: r | |
}); | |
e.ok && (o = await e.json()) | |
} catch (e) { | |
console.error(e) | |
} | |
const s = o.metadata; | |
let a = !1; | |
if (n.title !== s.title && (a = !0, | |
s.title = n.title), | |
n.author !== s.author && (a = !0, | |
s.author = n.author), | |
a) | |
try { | |
if (!(await fetch(i, { | |
method: "PUT", | |
headers: r, | |
body: JSON.stringify({ | |
uploadMetaData: s | |
}) | |
})).ok) | |
throw new Error(v.ERROR.NETWORK_BOSH_FAIL) | |
} catch (e) { | |
throw console.error(e), | |
new Error(v.ERROR.NETWORK_BOSH_FAIL) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-cloud/util.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return o | |
} | |
)), | |
n.d(t, "b", (function() { | |
return a | |
} | |
)); | |
n("./node_modules/core-js/modules/es.string.replace.js"); | |
const r = window.tolino.config | |
, i = { | |
"̀": "", | |
"́": "", | |
"̂": "", | |
"̃": "", | |
"̄": "", | |
"̆": "", | |
"̇": "", | |
"̈": "e", | |
"̉": "", | |
"̊": "", | |
"̋": "", | |
"̌": "" | |
}; | |
async function o(e, t, n, i, o) { | |
return new Promise((s,a)=>{ | |
const u = new XMLHttpRequest; | |
u.open(n || "GET", e, !0), | |
u.responseType = "json", | |
u.timeout = void 0 !== i ? 1e3 * i : 1e4; | |
for (let e in t) | |
u.setRequestHeader(e, t[e]); | |
u.ontimeout = ()=>(u.ontimeout = u.onload = u.onerror = null, | |
a(r.ERROR.NETWORK_TIMEOUT)), | |
u.onload = u.onerror = function() { | |
var e, t, n, r, i; | |
if (u.ontimeout = u.onload = u.onerror = null, | |
u.status < 400) | |
return s(u.response); | |
const o = (null === (e = u.response) || void 0 === e || null === (t = e.ResponseInfo) || void 0 === t ? void 0 : t.message) || u.statusText | |
, l = (null === (n = u.response) || void 0 === n || null === (r = n.ResponseInfo) || void 0 === r ? void 0 : r.responseStatus) || u.status | |
, c = (null === (i = u.response) || void 0 === i ? void 0 : i.errors) || []; | |
return c.length > 0 ? a(new Error(c[0])) : a(new Error(`${o} (status ${l})`)) | |
} | |
, | |
u.send(o) | |
} | |
) | |
} | |
function s(e) { | |
var t = i[e]; | |
return void 0 !== t ? t : e | |
} | |
function a(e, t, n) { | |
const r = new FormData; | |
return r.append("file", e, t.replace(/[^A-Za-z0-9 ]/g, s)), | |
n && r.append("deliverableId", n), | |
r | |
} | |
}, | |
"./musketeer/modules/tolino-country-selection/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/modules/tolino-country-selection/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
var r = n.p + "musketeer/modules/tolino-country-selection/assets/country-selection-illustration.svg"; | |
t.default = function(e) { | |
const t = e.theme | |
, n = t.colors | |
, i = t.variables | |
, o = t.mixins; | |
return { | |
logoContainer: { | |
display: "flex", | |
flexDirection: "column", | |
height: 8 * i.basicUnit, | |
margin: "auto", | |
maxWidth: 1200, | |
width: "100%", | |
"> div:first-child": { | |
backgroundPosition: "0 " + 2 * i.basicUnit + "px", | |
backgroundSize: "auto " + 4.5 * i.basicUnit + "px !important", | |
flex: "1 0 " + 6.5 * i.basicUnit + "px" | |
} | |
}, | |
logo: { | |
flex: "0 0 " + 2 * i.basicUnit + "px", | |
lineHeight: 1, | |
marginTop: i.basicUnit | |
}, | |
contentContainer: Object.assign(o.globalPaddingHelper({ | |
axis: "x" | |
}), { | |
display: "flex", | |
height: "calc(100% - " + i.uiHeaderBarHeight + "px)", | |
margin: "0 auto", | |
maxWidth: 1200, | |
smallScreens: { | |
flexDirection: "column", | |
height: "100%" | |
}, | |
mediumScreens: { | |
flexDirection: "column", | |
height: "100%" | |
} | |
}), | |
illustration: { | |
backgroundImage: "url(" + r + ")", | |
backgroundPosition: "center center", | |
backgroundRepeat: "no-repeat", | |
backgroundSize: "contain", | |
flex: 1, | |
margin: "0 " + 8 * i.basicUnit + "px 0 0", | |
width: "75%", | |
smallScreens: { | |
alignSelf: "center", | |
margin: 6 * i.basicUnit + "px 0", | |
maxHeight: 20 * i.basicUnit, | |
minHeight: 15 * i.basicUnit | |
}, | |
mediumScreens: { | |
alignSelf: "center", | |
margin: 6 * i.basicUnit + "px 0", | |
maxHeight: 20 * i.basicUnit, | |
minHeight: 15 * i.basicUnit | |
} | |
}, | |
listContainer: { | |
display: "flex", | |
flexDirection: "column", | |
flex: 1, | |
padding: "0 " + 2 * i.basicUnit + "px " + 2 * i.basicUnit + "px", | |
smallScreens: { | |
flex: 2 | |
}, | |
mediumScreens: { | |
flex: 2 | |
} | |
}, | |
list: Object.assign(o.scrollable("y"), { | |
flex: 1, | |
overflowY: "auto", | |
"> ul li": { | |
color: n.accent, | |
fontSize: i.fontSizeBody + "rem", | |
fontFamily: "ui-bold", | |
":hover": { | |
cursor: "pointer", | |
textDecoration: "underline" | |
}, | |
":active": { | |
color: n.accent, | |
cursor: "pointer", | |
fontFamily: "ui-bold", | |
textDecoration: "underline" | |
} | |
} | |
}), | |
popupPosition: { | |
alignSelf: "center", | |
position: "relative !important" | |
} | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-country-selection/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/modules/tolino-country-selection/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/modules/tolino-global/entitlements.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "c", (function() { | |
return h | |
} | |
)), | |
n.d(t, "f", (function() { | |
return m | |
} | |
)), | |
n.d(t, "e", (function() { | |
return b | |
} | |
)), | |
n.d(t, "a", (function() { | |
return g | |
} | |
)), | |
n.d(t, "d", (function() { | |
return y | |
} | |
)), | |
n.d(t, "g", (function() { | |
return v | |
} | |
)), | |
n.d(t, "h", (function() { | |
return w | |
} | |
)), | |
n.d(t, "i", (function() { | |
return S | |
} | |
)), | |
n.d(t, "b", (function() { | |
return j | |
} | |
)); | |
var r = n("./musketeer/modules/tolino-shared/index.js") | |
, i = n("./node_modules/postal/lib/postal.js") | |
, o = n.n(i); | |
n("./musketeer/modules/tolino-oauth/reducer.js"); | |
const s = o.a.channel("app") | |
, a = r.j.MISC.UI_ACTION_TYPE | |
, u = r.j.NET.METADATA | |
, l = { | |
modified: 0 | |
} | |
, c = Object.freeze([]) | |
, d = Object.freeze({}) | |
, f = e=>e.protectionType === r.j.MISC.PROTECTION_TYPE.ACS4 | |
, h = e=>e.itemType || (null == e ? void 0 : e.type.category) | |
, p = e=>{ | |
var t; | |
return null == e || null === (t = e.type) || void 0 === t ? void 0 : t.fileType | |
} | |
, m = e=>e && h(e) === r.j.ENTITLEMENT_TYPES.AUDIOBOOK | |
, b = e=>{ | |
var t; | |
return (null == e || null === (t = e.bookmark) || void 0 === t ? void 0 : t.modified) > 0 | |
} | |
; | |
function g(e) { | |
var t; | |
const n = (null == e || null === (t = e.author) || void 0 === t ? void 0 : t[0]) || d; | |
return n.lastName ? n.firstName ? n.firstName + " " + n.lastName : n.lastName : n.name || "" | |
} | |
const y = e=>e && Math.round(100 * (e.bookmark && e.bookmark.progress || 0)) | |
, v = e=>{ | |
var t; | |
return null === (t = e.clientData) || void 0 === t ? void 0 : t.isAvailableOffline | |
} | |
; | |
function _(e, t) { | |
var n, r, i; | |
const o = (null === (n = e.family) || void 0 === n || null === (r = n.members) || void 0 === r ? void 0 : r.length) || 0; | |
if (0 === o) | |
return !0; | |
return ((null === (i = (e.shares[t] || d).receivers) || void 0 === i ? void 0 : i.length) || 0) < o - 1 | |
} | |
function w(e, t) { | |
var n; | |
if (0 === (t.familyMembers || (null === (n = t.family.family) || void 0 === n ? void 0 : n.members) || c).length) | |
t.history.push({ | |
pathname: "/create-family" | |
}); | |
else { | |
const n = ()=>t.history.push({ | |
pathname: "/share-book" | |
}) | |
, r = ()=>t.history.push("/manage-family"); | |
s.publish("rx.select-family-member.share", { | |
id: e, | |
shareAnotherBook: n, | |
goToFamilyHome: r | |
}) | |
} | |
} | |
const S = (e,t)=>{ | |
return { | |
author: g(e), | |
borrowedDays: e.borrowedDays || 0, | |
coverUri: e.coverURI, | |
id: e.id, | |
isDownloaded: v(e), | |
isFinished: e.clientData && e.clientData.isFinished, | |
isShareable: e.isShareable, | |
isSubscription: Boolean(e.subscriptionId), | |
isNew: !e || E(e), | |
itemType: h(e), | |
progress: y(e), | |
reseller: e.reseller && e.reseller.name || "", | |
title: e.title || "", | |
isProtected: f(e), | |
isDemo: !t.user.userId, | |
hasToken: !t.token.isDemo, | |
sourceTypes: (n = e, | |
(null == n || null === (r = n.type) || void 0 === r ? void 0 : r.sources) || c), | |
fileType: p(e) | |
}; | |
var n, r | |
} | |
, E = ({bookmark: e=l, comments: t=c, dogears: n=c, tags: r=c})=>!e.modified && 0 === n.length && 0 === t.length && r.every(e=>e.name !== u.TAG_FINISHED_READINGS && e.name !== u.TAG_FINISHED_HEARINGS) | |
, j = (e,t)=>{ | |
const n = !e.token.isDemo | |
, {location: i, resellerInfo: o, t: l} = e; | |
let c = !1 | |
, d = t.sourceTypes.includes("LOANED") | |
, h = ""; | |
const p = t.itemType === r.j.ENTITLEMENT_TYPES.AUDIOBOOK | |
, m = t.itemType !== r.j.ENTITLEMENT_TYPES.EDATA | |
, b = t.sourceTypes.includes("FAMILY_SHARED"); | |
if (i.pathname.indexOf("collections") >= 0) { | |
var g; | |
c = !0; | |
const t = /[&?]name=([^&]*)/.exec(i.search); | |
h = t ? decodeURIComponent(t[1]) : "", | |
d = (null === (g = e.collections[h]) || void 0 === g ? void 0 : g.category) === r.j.MISC.SUBSCRIPTION_CATEGORY | |
} | |
const y = window.tolino.config.APP.FEATURES.FAMILY_SHARING && ("true" === (null == o ? void 0 : o.config.FAMILY_SHARING_ACTIVE) || !0 === (null == o ? void 0 : o.config.FAMILY_SHARING_ACTIVE)) | |
, v = c && (h === u.TAG_FAMILY_SHARING_EBOOK || h === u.TAG_FAMILY_SHARING_AUDIO) | |
, S = [{ | |
title: l("Open"), | |
testId: "library-headerBar-menu-item-open", | |
enabled: !f(t), | |
onSelectItem: ()=>{ | |
s.publish("rx.loader.request", { | |
id: t.id, | |
callback: t=>{ | |
if (!t.error) | |
return e.history ? e.history.push({ | |
pathname: "/" + t.viewState, | |
search: "?id=" + t.id | |
}) : void 0 | |
} | |
}) | |
} | |
}, { | |
title: l(p ? "About the audiobook" : "About the book"), | |
testId: "library-headerBar-menu-item-detail", | |
enabled: !0, | |
onSelectItem: ()=>e.history.push({ | |
pathname: "/details", | |
search: "?id=" + t.id | |
}) | |
}, { | |
title: l("Edit infos"), | |
testId: "library-headerBar-menu-item-edit", | |
enabled: n && !t.isDemo && !m, | |
onSelectItem: ()=>{ | |
s.publish("rx.metadata.edit", t.id) | |
} | |
}, { | |
title: p ? t.isFinished ? l("Mark as unheard") : l("Mark as heard") : t.isFinished ? l("Mark as unread") : l("Mark as read"), | |
testId: "library-headerBar-menu-item-mark-as-read", | |
enabled: !t.isDemo, | |
onSelectItem: ()=>{ | |
s.publish("app.action", { | |
action: a.MARK_AS_FINISHED, | |
params: { | |
id: t.id, | |
isCurrentlyFinished: t.isFinished | |
} | |
}) | |
} | |
}]; | |
return y && n && S.splice(S.length - 1, 0, { | |
title: l("Share"), | |
testId: "library-headerBar-menu-item-edit", | |
enabled: t.isShareable && !t.isDemo && !b && !d && _(e.family, t.id), | |
onSelectItem: ()=>w(t.id, e) | |
}), | |
/my(audio)?books/.test(i.pathname) && S.push({ | |
title: l("Add to collection"), | |
testId: "library-headerBar-menu-item-add-to-collection", | |
enabled: !t.isDemo, | |
onSelectItem: ()=>{ | |
s.publish("app.action", { | |
action: a.CHOOSE_COLLECTION_TO_ADD, | |
params: { | |
id: t.id | |
} | |
}) | |
} | |
}), | |
c && S.push({ | |
title: l("Remove from collection"), | |
testId: "library-headerBar-menu-item-remove-from-collection", | |
enabled: !t.isDemo && !d && !v, | |
onSelectItem: ()=>{ | |
s.publish("app.action", { | |
action: a.REMOVE_FROM_COLLECTION, | |
params: { | |
id: t.id | |
} | |
}) | |
} | |
}), | |
b || S.push({ | |
title: l("Download"), | |
testId: "library-headerBar-menu-item-download", | |
enabled: n && !t.isDemo && !d && !t.isSubscription, | |
onSelectItem: ()=>{ | |
s.publish("rx.downloader.request", t.id) | |
} | |
}), | |
S.push({ | |
title: l("Delete"), | |
testId: "library-headerBar-menu-item-delete-book", | |
enabled: n && !t.isDemo, | |
onSelectItem: ()=>{ | |
s.publish("app.action", { | |
action: a.DELETE_TITLE, | |
params: { | |
id: t.id | |
} | |
}) | |
} | |
}), | |
S | |
} | |
}, | |
"./musketeer/modules/tolino-global/settings.actions.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "b", (function() { | |
return o | |
} | |
)), | |
n.d(t, "a", (function() { | |
return s | |
} | |
)); | |
var r = n("./musketeer/modules/async-storage/index.js"); | |
const i = window.tolino.config; | |
function o() { | |
return e=>r.a.getItem("settings", i.APP).then(t=>e({ | |
type: "RESTORE_SETTINGS", | |
settings: t | |
}), e=>console.warn("Error fetching settings from AsyncStorage", e)) | |
} | |
function s() { | |
return async e=>{ | |
e({ | |
type: "PURGE_SETTINGS" | |
}) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-oauth/actions.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "d", (function() { | |
return m | |
} | |
)), | |
n.d(t, "c", (function() { | |
return b | |
} | |
)), | |
n.d(t, "e", (function() { | |
return g | |
} | |
)), | |
n.d(t, "b", (function() { | |
return y | |
} | |
)), | |
n.d(t, "a", (function() { | |
return v | |
} | |
)), | |
n.d(t, "h", (function() { | |
return S | |
} | |
)), | |
n.d(t, "i", (function() { | |
return j | |
} | |
)), | |
n.d(t, "f", (function() { | |
return x | |
} | |
)), | |
n.d(t, "g", (function() { | |
return O | |
} | |
)); | |
var r = n("./musketeer/modules/async-storage/index.js") | |
, i = n("./node_modules/crypto-js/index.js") | |
, o = n.n(i); | |
const s = window.tolino.config.ERROR; | |
function a(e, t) { | |
for (var n = Object.keys(e), r = new RegExp("OAUTH_X_(.*)_KEY"), i = 0; i < n.length; i++) | |
n[i].match(r) && t.push(e["OAUTH_X_" + RegExp.$1 + "_KEY"] + "=" + e["OAUTH_X_" + RegExp.$1 + "_VALUE"]); | |
return t | |
} | |
function u(e, t) { | |
return function(e, t=1e4) { | |
const n = new Promise((e,n)=>{ | |
setTimeout(()=>{ | |
n(new Error(s.NETWORK_TIMEOUT)) | |
} | |
, t) | |
} | |
); | |
return Promise.race([n, e]) | |
}(fetch(e, { | |
method: "POST", | |
headers: new Headers({ | |
"Content-Type": "application/x-www-form-urlencoded" | |
}), | |
body: t | |
})).then(e=>e.ok ? e.json() : Promise.reject(function(e) { | |
return 406 === e.status && s.DEVICE_LIMIT || "NETWORK_OFFLINE" === e.statusText && s.NETWORK_OFFLINE || e.statusText === s.NETWORK_TIMEOUT && s.NETWORK_TIMEOUT || s.NETWORK_BOSH_FAIL | |
}(e))) | |
} | |
var l = { | |
fromCode: function(e, t) { | |
if (!e) | |
return Promise.reject("no code available"); | |
let n = ["client_id=" + encodeURIComponent(t.OAUTH_CLIENT_ID), "grant_type=authorization_code", "code=" + encodeURIComponent(e), "scope=" + encodeURIComponent(t.OAUTH_SCOPE), "redirect_uri=" + encodeURIComponent(t.URL_OAUTH_REDIRECT)]; | |
return n = a(t, n), | |
u(t.URL_OAUTH_ACCESSTOKEN, n.join("&")) | |
}, | |
fromRefreshToken: function(e, t) { | |
if (!e) | |
return Promise.reject(s.APP_REAUTH_FAILED); | |
var n = ["client_id=" + encodeURIComponent(t.OAUTH_CLIENT_ID), "grant_type=refresh_token", "refresh_token=" + encodeURIComponent(e), "scope=" + encodeURIComponent(t.OAUTH_SCOPE)].join("&"); | |
return u(t.URL_OAUTH_ACCESSTOKEN, n) | |
}, | |
getAuthorizeUrl: function(e, t) { | |
let n = ["client_id=" + e.OAUTH_CLIENT_ID, "response_type=code", "scope=" + encodeURIComponent(e.OAUTH_SCOPE), "redirect_uri=" + encodeURIComponent(e.URL_OAUTH_REDIRECT)]; | |
n = a(e, n); | |
let r = e.CHANNEL_ID; | |
return r && n.push("channelid=" + r), | |
t && e.URL_OAUTH_AUTOLOGIN ? (console.info("Using autoLogin url for authorization"), | |
e.URL_OAUTH_AUTOLOGIN + "?" + n.join("&")) : e.URL_OAUTH_AUTHORIZATION + "?" + n.join("&") | |
}, | |
revokeToken: function(e, t) { | |
if (!e) | |
return Promise.reject("no refreshtoken to revoke"); | |
var n = ["client_id=" + encodeURIComponent(t.OAUTH_CLIENT_ID), "token_type_hint=refresh_token", "token=" + encodeURIComponent(e)].join("&"); | |
return u(t.URL_OAUTH_REVOKETOKEN, n) | |
} | |
} | |
, c = n("./node_modules/postal/lib/postal.js") | |
, d = n.n(c); | |
const f = window.tolino.config | |
, h = f.ERROR | |
, p = d.a.channel("app") | |
, m = "SET_TOKEN" | |
, b = "SET_DEMO_TOKEN" | |
, g = "SET_TOKEN_ISFETCHING" | |
, y = "PURGE_TOKEN" | |
, v = "INVALID_ACCESS_TOKEN"; | |
function _(e) { | |
const t = (new Date).getTime() + 1e3 * e.expires_in; | |
console.info("Token will expire in " + Math.round(e.expires_in / 60) + " minutes @", new Date(t).toLocaleTimeString()); | |
const n = o.a.AES.encrypt(e.refresh_token, f.VERSION.PHRASE).toString(); | |
return r.a.setItem("userToken", { | |
refresh: n, | |
expireTime: t | |
}, f.USERSTORE), | |
{ | |
type: m, | |
value: { | |
isFetching: !1, | |
isDemo: !1, | |
receivedAt: Date.now(), | |
expireTime: t, | |
access: e.access_token, | |
refresh: e.refresh_token | |
} | |
} | |
} | |
function w(e) { | |
return { | |
type: b, | |
value: { | |
isFetching: !1, | |
isDemo: !0, | |
receivedAt: Date.now(), | |
expireTime: 1 / 0, | |
access: e | |
} | |
} | |
} | |
function S() { | |
return async function(e, t) { | |
let n = t().resellerInfo.config; | |
n.CHANNEL_ID = t().resellerInfo.channelId; | |
const r = l.getAuthorizeUrl(n); | |
window.location.href = r | |
} | |
} | |
function E(e, t, n, i) { | |
return r.a.removeItem("userToken", f.USERSTORE).then(l.fromCode.bind(this, n, t().resellerInfo.config)).then(t=>e(_(t))).catch(t=>(console.error("fetchTokenFromCode:", t), | |
i && p.publish("rx.error", { | |
message: t | |
}), | |
e(w(config.OAUTH_TOKEN_DEMO_USER)), | |
Promise.reject(t))) | |
} | |
async function j(e, t, n) { | |
if (n = n || {}, | |
!t) | |
return; | |
const i = t() | |
, s = i.resellerInfo && i.resellerInfo.config; | |
return e({ | |
type: g, | |
value: { | |
isFetching: !0 | |
} | |
}), | |
n.code ? E(e, t, n.code, n.isErrorDialogEnabled) : n.isAutoLogin ? function(e) { | |
let t = e().resellerInfo.config; | |
const n = l.getAuthorizeUrl(t, !0); | |
return window.sessionStorage.setItem("hash", window.location.hash), | |
setTimeout(()=>{ | |
window.location.href = n | |
} | |
, 1e3), | |
Promise.resolve() | |
}(t) : r.a.getItem("userToken", f.USERSTORE).then(e=>e && e.refresh ? o.a.AES.decrypt(e.refresh, f.VERSION.PHRASE).toString(o.a.enc.Utf8) : Promise.reject(h.APP_NO_STORED_TOKEN)).then(e=>l.fromRefreshToken(e, t().resellerInfo.config)).then(t=>e(_(t))).catch(i=>{ | |
var o; | |
return console.error("fetchFromRefreshToken (isDemo: %s): %s", t().token.isDemo, i), | |
n.isErrorDialogEnabled && p.publish("rx.error", { | |
message: i | |
}), | |
((o = i) === h.APP_NO_STORED_TOKEN || o === h.NETWORK_BOSH_FAIL || o === h.DEVICE_LIMIT) && (r.a.removeItem("userToken", f.USERSTORE), | |
e(w(s.OAUTH_TOKEN_DEMO_USER))), | |
Promise.reject(i) | |
} | |
) | |
} | |
function x(e, t) { | |
return function(n, r) { | |
return j(n, r, { | |
code: e, | |
isAutoLogin: t | |
}) | |
} | |
} | |
function O() { | |
return async(e,t)=>{ | |
try { | |
await r.a.removeItem("userToken", f.USERSTORE), | |
await r.a.clear(f.USERSTORE) | |
} catch (e) { | |
console.info(e) | |
} finally { | |
const n = t(); | |
try { | |
await l.revokeToken(n.token.refresh, n.resellerInfo.config) | |
} catch (e) { | |
console.info(e) | |
} finally { | |
e({ | |
type: y | |
}) | |
} | |
} | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-oauth/reducer.js": function(e, t, n) { | |
"use strict"; | |
n("./musketeer/modules/async-storage/index.js"); | |
var r = n("./musketeer/modules/tolino-oauth/actions.js"); | |
t.a = (e=null,t)=>{ | |
switch (t.type) { | |
case r.a: | |
return { | |
...e, | |
access: null, | |
expireTime: null, | |
isDemo: !1, | |
isFetching: !1, | |
receivedAt: null | |
}; | |
case r.b: | |
return null; | |
case r.e: | |
return { | |
...t.value, | |
...e | |
}; | |
case r.d: | |
case r.c: | |
return t.value; | |
default: | |
return e | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-read/read.jsx": function(e, t, n) { | |
"use strict"; | |
n.d(t, "b", (function() { | |
return d | |
} | |
)); | |
var r, i = n("./node_modules/react/index.js"), o = n("./musketeer/components/UIActivityIndicator/index.js"), s = n("./node_modules/shitty-qs/index.js"), a = n.n(s), u = n("./node_modules/react-router/esm/react-router.js"); | |
function l(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
const c = window.tolino.config; | |
function d(e) { | |
const t = { | |
id: e.id | |
}; | |
switch (e.type.fileType) { | |
case "application/epub+zip": | |
t.viewState = "epub"; | |
break; | |
case "application/pdf": | |
t.viewState = "pdf"; | |
break; | |
case "audio/mpeg": | |
t.viewState = "playlist"; | |
break; | |
default: | |
throw new Error(new Error(c.ERROR.UNSUPPORTED_MEDIA)) | |
} | |
return t | |
} | |
t.a = function(e) { | |
const [t,n] = Object(i.useState)(null); | |
return Object(i.useEffect)(()=>{ | |
e.fetchBookshelf() | |
} | |
, []), | |
Object(i.useEffect)(()=>{ | |
if (Object.keys(e.entitlements).length > 0) | |
try { | |
let t = function(e) { | |
let t; | |
if (t = a()(e).id, | |
!t) | |
throw new Error(c.ERROR.APP_NO_ENTITLEMENT_ID); | |
return t | |
}(e.location.search); | |
const r = e.entitlements[t]; | |
r ? n(d(r)) : e.history.push("/") | |
} catch (t) { | |
e.history.push("/") | |
} | |
return ()=>{} | |
} | |
, [e.entitlements]), | |
t ? l(u.a, { | |
push: !1, | |
to: { | |
pathname: "/" + t.viewState, | |
search: "?id=" + t.id | |
} | |
}) : l(o.a, {}) | |
} | |
}, | |
"./musketeer/modules/tolino-reseller-selection/styles.android.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/modules/tolino-reseller-selection/styles.common.js": function(e, t, n) { | |
"use strict"; | |
n.r(t); | |
var r = n.p + "musketeer/modules/tolino-reseller-selection/assets/reseller-selection-illustration.svg"; | |
t.default = function(e) { | |
const t = e.theme | |
, n = (t.colors, | |
t.variables) | |
, i = t.mixins; | |
return { | |
container: Object.assign(i.globalPaddingHelper({ | |
axis: "x" | |
}), i.fullWidthHeight(), { | |
display: "flex", | |
margin: "0 auto", | |
maxWidth: 1200 | |
}), | |
illustration: { | |
backgroundImage: "url(" + r + ")", | |
backgroundPosition: "center center", | |
backgroundRepeat: "no-repeat", | |
backgroundSize: "contain", | |
flex: 1, | |
margin: "0 " + 8 * n.basicUnit + "px 0 0", | |
width: "75%", | |
smallScreens: { | |
display: "none" | |
}, | |
mediumScreens: { | |
display: "none" | |
} | |
}, | |
contentContainer: { | |
display: "flex", | |
flex: 1, | |
flexDirection: "column" | |
}, | |
listContainer: { | |
display: "flex", | |
flex: 1, | |
flexDirection: "column", | |
height: "100%" | |
}, | |
listHeader: { | |
display: "flex", | |
flexDirection: "column", | |
"> svg": { | |
marginLeft: -n.basicUnit | |
} | |
}, | |
list: Object.assign(i.scrollable("y"), { | |
flex: 1, | |
padding: "0 " + 2 * n.basicUnit + "px " + 2 * n.basicUnit + "px", | |
"> ul li": { | |
":hover": { | |
cursor: "pointer" | |
} | |
} | |
}), | |
popupPosition: { | |
maxWidth: "100% !important", | |
position: "relative !important", | |
top: "50%", | |
transform: "translateY(-50%)" | |
} | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-reseller-selection/styles.ios.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/modules/tolino-reseller-selection/styles.web.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = function() { | |
return {} | |
} | |
}, | |
"./musketeer/modules/tolino-reseller/actions.js": function(t, n, r) { | |
"use strict"; | |
r.d(n, "a", (function() { | |
return a | |
} | |
)), | |
r.d(n, "c", (function() { | |
return u | |
} | |
)), | |
r.d(n, "e", (function() { | |
return l | |
} | |
)), | |
r.d(n, "d", (function() { | |
return c | |
} | |
)), | |
r.d(n, "f", (function() { | |
return d | |
} | |
)), | |
r.d(n, "g", (function() { | |
return f | |
} | |
)), | |
r.d(n, "b", (function() { | |
return h | |
} | |
)), | |
r.d(n, "l", (function() { | |
return p | |
} | |
)), | |
r.d(n, "m", (function() { | |
return m | |
} | |
)), | |
r.d(n, "n", (function() { | |
return b | |
} | |
)), | |
r.d(n, "h", (function() { | |
return g | |
} | |
)), | |
r.d(n, "i", (function() { | |
return y | |
} | |
)), | |
r.d(n, "j", (function() { | |
return v | |
} | |
)), | |
r.d(n, "k", (function() { | |
return _ | |
} | |
)); | |
var i = r("./musketeer/modules/tolino-reseller/service.js") | |
, o = r("./musketeer/modules/async-storage/index.js"); | |
const s = window.tolino.config | |
, a = "PURGE_RESELLER_CONFIG" | |
, u = "SET_CONFIG" | |
, l = "SET_COUNTRY" | |
, c = "SET_COUNTRIES" | |
, d = "SET_RESELLER" | |
, f = "SET_RESELLERS" | |
, h = "SET_CHANNELID"; | |
function p(e, t) { | |
if (e.channelId) { | |
if (!t) | |
try { | |
o.a.setItem("channelId", e.channelId, s.RESELLERSTORE) | |
} catch (e) { | |
console.error(e) | |
} | |
return { | |
type: h, | |
value: e.channelId | |
} | |
} | |
} | |
function m(e, t) { | |
try { | |
null === e ? o.a.removeItem("country", s.RESELLERSTORE) : !t && e && o.a.setItem("country", e, s.RESELLERSTORE) | |
} catch (e) { | |
console.error(e) | |
} | |
return { | |
type: l, | |
value: e | |
} | |
} | |
function b(e, t) { | |
if (!t) | |
try { | |
o.a.setItem("reseller", e, s.RESELLERSTORE) | |
} catch (e) { | |
console.error(e) | |
} | |
return { | |
type: d, | |
value: e | |
} | |
} | |
function g(e) { | |
return async function(t, n) { | |
let r; | |
t({ | |
type: u, | |
value: { | |
isFetching: !0 | |
} | |
}); | |
let a = !1 | |
, l = n().resellerInfo.reseller.resellerId; | |
s.NET.OAUTHSIM && (l = "1"); | |
try { | |
r = await i.a.fetchConfig(l) | |
} catch (e) { | |
console.warn(e), | |
r = {}, | |
a = !0; | |
try { | |
r.config = await o.a.getItem("resellerConfig", s.RESELLERSTORE) | |
} catch (e) { | |
r.config = null, | |
a = !1 | |
} | |
} | |
if (!r) | |
return t((c = "no config found", | |
{ | |
type: u, | |
value: { | |
isFetching: !1, | |
receivedAt: Date.now(), | |
isErrornous: !0, | |
reason: c | |
} | |
})); | |
Object.keys(r.config).forEach(e=>{ | |
"false" === r.config[e] ? r.config[e] = !1 : "null" === r.config[e] && (r.config[e] = null) | |
} | |
), | |
s.NET.OAUTHSIM && (r.config.URL_OAUTH_REDIRECT = window.location.origin + location.pathname), | |
s.NET.URL_OAUTH_REDIRECT_OVERRIDE && (r.config.URL_OAUTH_REDIRECT = s.NET.URL_OAUTH_REDIRECT_OVERRIDE), | |
r.config.URL_FAMILY || (r.config.URL_FAMILY = s.NET.FAMILY), | |
r.config.URL_INVENTORY || (r.config.URL_INVENTORY = s.NET.INVENTORY); | |
try { | |
const e = await o.a.getItem("channelId", s.RESELLERSTORE); | |
e && t(p({ | |
channelId: e | |
}, !0)) | |
} catch (e) {} | |
var c; | |
t(function(e, t) { | |
const n = { | |
...e.config, | |
client_type: e.client_type, | |
reseller_id: e.reseller_id, | |
lastModified: e.lastModified | |
}; | |
if (!t) | |
try { | |
o.a.setItem("resellerConfig", n, s.RESELLERSTORE) | |
} catch (e) { | |
console.error(e) | |
} | |
return { | |
type: u, | |
value: { | |
...n, | |
receivedAt: Date.now(), | |
isFetching: !1 | |
} | |
} | |
}(r, a)), | |
"function" == typeof e && e(r) | |
} | |
} | |
function y() { | |
return async function(e) { | |
let t; | |
try { | |
if (t = await o.a.getItem("country", s.RESELLERSTORE), | |
console.log("country", t), | |
t) | |
return e(m(t, !0)) | |
} catch (e) { | |
console.warn(e), | |
t = null | |
} | |
e({ | |
type: c, | |
value: { | |
isFetching: !0 | |
} | |
}); | |
let n, r = !1; | |
try { | |
n = await i.a.fetchCountries() | |
} catch (e) { | |
console.warn(e), | |
r = !0; | |
try { | |
n = await o.a.getItem("countries", s.RESELLERSTORE) | |
} catch (e) { | |
n = null, | |
r = !1 | |
} | |
} | |
return e(n ? function(e, t) { | |
if (!t) | |
try { | |
o.a.setItem("countries", e, s.RESELLERSTORE) | |
} catch (e) { | |
console.error(e) | |
} | |
return { | |
type: c, | |
value: { | |
data: e, | |
isFetching: !1, | |
receivedAt: Date.now() | |
} | |
} | |
}(n, r) : (a = "no valid answer", | |
{ | |
type: c, | |
value: { | |
isFetching: !1, | |
receivedAt: Date.now(), | |
error: !0, | |
reason: a | |
} | |
})); | |
var a | |
} | |
} | |
function v() { | |
return async function(t) { | |
let n; | |
try { | |
if (n = await o.a.getItem("reseller", s.RESELLERSTORE), | |
n) | |
return t(b(n, !0)) | |
} catch (e) { | |
console.warn(e), | |
n = null | |
} | |
t((async function(t, n) { | |
t({ | |
type: f, | |
value: { | |
isFetching: !0, | |
data: null | |
} | |
}); | |
const r = n().resellerInfo.country.countryCode; | |
let a, u = !1; | |
try { | |
a = await i.a.fetchResellers(r) | |
} catch (e) { | |
console.warn(e); | |
try { | |
a = await o.a.getItem("resellers", s.RESELLERSTORE), | |
u = !0 | |
} catch (e) { | |
a = null, | |
u = !1 | |
} | |
} | |
return t(a ? function(e, t) { | |
if (!t) | |
try { | |
o.a.setItem("resellers", e, s.RESELLERSTORE) | |
} catch (e) { | |
console.error(e) | |
} | |
return { | |
type: f, | |
value: { | |
data: e, | |
isFetching: !1, | |
receivedAt: Date.now() | |
} | |
} | |
}(a, u) : (l = e, | |
{ | |
type: f, | |
value: { | |
isFetching: !1, | |
receivedAt: Date.now(), | |
data: null, | |
error: !0, | |
reason: l | |
} | |
})); | |
var l | |
} | |
)) | |
} | |
} | |
function _() { | |
return async(e,t)=>{ | |
await o.a.removeItem("reseller", s.RESELLERSTORE), | |
await o.a.clear(s.RESELLERSTORE), | |
e({ | |
type: a | |
}) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-reseller/service.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./node_modules/postal/lib/postal.js") | |
, i = n.n(r); | |
const o = window.tolino.config | |
, s = i.a.channel("app"); | |
let a, u = "de_DE"; | |
async function l(e, t=1e4) { | |
const n = new Promise((e,n)=>{ | |
setTimeout(()=>{ | |
n(new Error(o.ERROR.NETWORK_TIMEOUT)) | |
} | |
, t) | |
} | |
); | |
return Promise.race([n, e]) | |
} | |
function c(e) { | |
let t; | |
let n = ""; | |
if (u && (n = function(e) { | |
const t = e.match("[A-Z]{2}"); | |
return 1 === t.length ? a.RESELLER.LANGUAGES_BOSH_MAP[t[0]] || t[0] : null | |
}(u)), | |
n && e[n]) { | |
t = []; | |
const r = e[n]; | |
for (let i = 0; i < r.length; i++) | |
r[i].countryCode === n ? t.unshift(r[i]) : r[i] && t.push(e[n][i]); | |
return t | |
} | |
return null | |
} | |
async function d(e) { | |
const t = a.NET.BOSH + a.RESELLER.SELECTION + "?countryCode=" + e + "&resellerGroup=" + a.RESELLER.GROUP + "&client_type=" + a.NET.CLIENT_TYPE; | |
let n; | |
try { | |
const e = await l(fetch(t, { | |
method: "GET", | |
cache: "no-cache", | |
headers: new Headers({ | |
Accept: "application/json", | |
"Content-Type": "application/json" | |
}), | |
mode: "cors" | |
})); | |
e.ok && (n = await e.json()) | |
} catch (e) { | |
console.warn(e), | |
n = {} | |
} | |
return function(e) { | |
if ("string" == typeof e) | |
try { | |
e = JSON.parse(e) | |
} catch (e) { | |
console.error(e) | |
} | |
return e && e.resellerSelectionResponse && e.resellerSelectionResponse.resellerSelection | |
}(n) | |
} | |
t.a = class { | |
static setConfiguration(e) { | |
a = e | |
} | |
static setLanguage(e) { | |
u = e | |
} | |
static async fetchCountries() { | |
return async function() { | |
const e = a.NET.BOSH + a.RESELLER.COUNTRY + "?resellerGroup=" + a.RESELLER.GROUP; | |
let t; | |
try { | |
const n = await l(fetch(e, { | |
method: "GET", | |
cache: "no-cache", | |
headers: new Headers({ | |
Accept: "application/json", | |
"Content-Type": "application/json" | |
}), | |
mode: "cors" | |
})); | |
n.ok && (t = await n.json()) | |
} catch (e) { | |
return console.warn(e), | |
s.publish("rx.error", e), | |
[] | |
} | |
return c(function(e) { | |
const t = e && e.resellerCountryResponse && e.resellerCountryResponse.resellerCountryGroups | |
, n = {}; | |
if (t) | |
for (let e in t) | |
n[t[e].languageCode] = t[e].resellerCountries; | |
return n | |
}(t)) | |
}() | |
} | |
static async fetchResellers(e) { | |
return d(e) | |
} | |
static async fetchConfig(e) { | |
return async function(e) { | |
const t = a.NET.BOSH + a.RESELLER.CONFIG; | |
let n; | |
try { | |
const r = await l(fetch(t, { | |
method: "GET", | |
cache: "no-cache", | |
headers: new Headers({ | |
Accept: "application/json", | |
"Content-Type": "application/json", | |
reseller_id: e, | |
client_type: a.NET.CLIENT_TYPE, | |
client_version: a.VERSION.OFFICIAL | |
}), | |
mode: "cors" | |
})); | |
r.ok && (n = await r.json()) | |
} catch (e) { | |
throw console.warn(e), | |
new Error(o.ERROR.APP_NO_CONFIG) | |
} | |
return n | |
}(e) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/globals.js": function(e, t, n) { | |
"use strict"; | |
t.a = { | |
APP: { | |
DOM_ROOT_CONTAINER_ID: "outer-container", | |
VERSION: "5.2.0" | |
}, | |
DATA: { | |
STORE_KEY: "tolino" | |
}, | |
DEMO: { | |
DEVICE_KEY: "DEMO::DEV::KEY", | |
HARDWARE_ID: "DEMO::HARWARE::ID", | |
USER_ID: "DEMO::USER" | |
}, | |
ENV: { | |
DEVELOP: "development", | |
PRODUCTION: "production" | |
}, | |
ERROR: { | |
MISSING_COUNTRY_SELECTION: "MISSING_COUNTRY_SELECTION", | |
MISSING_HARDWARE: "MISSING_HARDWARE", | |
MISSING_RESELLER_ID: "MISSING_RESELLER_ID", | |
MISSING_RESELLER_CONFIG: "MISSING_RESELLER_CONFIG", | |
MISSING_TOKEN: "MISSING_TOKEN", | |
TOKEN_EXPIRED: "TOKEN_EXPIRED" | |
}, | |
LOCALIZATION: { | |
DEFAULT_LANGUAGE: "de_DE", | |
VALID_LANGUAGES: ["de_DE", "en_US", "es_ES", "fr_FR", "it_IT", "nl_BE", "nl_NL"], | |
DISPLAY_LANGUAGE: { | |
de_DE: "Deutsch (Deutschland)", | |
en_US: "English (U.S.A)", | |
es_ES: "Español (España)", | |
fr_FR: "Français (France)", | |
it_IT: "Italiano (Italia)", | |
nl_BE: "Nederlands (België)", | |
nl_NL: "Nederlands (Nederland)" | |
}, | |
RESELLER_DEFAULT_LANGUAGE: { | |
1: "de_DE", | |
3: "de_DE", | |
4: "de_DE", | |
5: "de_DE", | |
6: "de_DE", | |
7: "de_DE", | |
8: "de_DE", | |
10: "de_DE", | |
11: "de_DE", | |
12: "de_DE", | |
13: "de_DE", | |
20: "de_DE", | |
21: "de_DE", | |
22: "de_DE", | |
23: "de_DE", | |
24: "de_DE", | |
30: "de_DE", | |
40: "de_DE", | |
60: "nl_NL", | |
61: "nl_BE", | |
80: "de_DE", | |
81: "de_DE", | |
82: "nl_NL", | |
90: "it_IT", | |
91: "it_IT", | |
92: "it_IT" | |
} | |
}, | |
MEDIA: { | |
IMAGE_DEFAULT_AUDIO: "assets/common/fallback-cover-audio.svg", | |
IMAGE_DEFAULT_PUB: "assets/common/fallback-cover-read.svg", | |
IMAGE_DEFAULT_VIDEO: "assets/common/poster-image-video.svg", | |
IMAGE_DEFAULT_VIDEO_UNSUPPORTED: "assets/common/poster-image-video-unsupported.svg", | |
IMAGE_NULL: "data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D", | |
IMAGE_PLACEHOLDER: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACCCAYAAADWiVPZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAE5lJREFUeNrsndlvHEXXxqt7xuPxvsZ2Qvb3AwmQ4BPcwAX/OlwCEkgvSHCDQhLHSex4txNvs731O9Wnp2YyY4+XrH0euTVbd/UsTz9nqXPKSavVcgbD+47UvgKDEdVgMKIajKgGgxHVYDCiGoyoBsO7Qzl+kCSJfSOG9wZxjt8U1WCm32B4I6a/B5KuWyO24SrRVCvfdXsuoibRBkFL2W1ihDVcAUFb2W0jetyXrIMoKgQdyrZy9rgUqazBcK4YKSMnW91vtWxrXEZR04ygFR+Bbdl3bLhqJEkyGxG4dVFFVTUdta/U8IYw2qWy547602yDzFX7Pg1vCNWMY+lpfDwrKFIftWLfp+ENoTJIzHOW6ddo/7X9trbMZTWcH7Ozs704WDpLNMsDjN03HdXjpAZDX/QRt9QNkEGyfKjhg4AR1WBENRiuCuXLHGyt1gZTVIPBiGowohoMRlSDEdVgMKIaDJeDpacMHz9RP2xb0p5eTlqvX4Bpmg58ga6trbmNjQ13cnLiyuWym5qacjdu3HBDQ0Oyr7ahNxoNud899nkv+CIKRNmu1R4c9kSCDAcHB+7w8NA1m00h4OjoqKtWqx3rH0DSZ8+e5eSu1+tCWo65c+dO/tz6+oYf60COnZiYcDMzM65UKplVMqJeHJAMAr548cLVajUhE6QaHq5Ixdj8/LxXy4q8trGx7l9vurGxcXft2jW3u7vrdnZ2ZJubm/OkHHcrK08y8oZOi62tTffy5b67efOWXADnIWtRiW1E7QKKB8lUJTHfkAmzjiI+e3bo9vZ2hWQQ+uTkSFRzYWFBSDw5OemOj49FjRnn+PhIiFkqpZ60ozL+/v5Lt7m57kZGRt3i4mJOwEFWqmEfM/2G3OQ3Gk1PpKon5E2vlmPy3Pr6mifZvlfDl+7Ro4fiBrB/pVKW+wBio6Tsj7ru7+/K84xx7949UdXl5cdue3vbE35P1Bm1NkW1qL+3Mp1Zq9sSJR0fHxfyVSoVMeMvXgSX4OjoSEx/mpZE5WIxRFk3NzdlH1rWIeL169f9OMPyOuOgtqg0AdZ5iFpUshY2j5o2Q7TP1kraG6SrViuOwByzjbmHtK0WhCp7wn3ibt++64k77OBLyx+E+kI4JRHEI2DCd0VBp6dnPOEn2+pQHspNuJIukD3eOGtTtrbzXNzAq7BEPe0nJ7pHQWu1E/EvIRwazC3EImK/deu2EC4QrdNv1MgeskH4iYnJLv8zyR53pq5evXqZuRb77sSfO03S/N0KqbOLyUx/oYjaytmKG9AKd8RUV6sjQsbV1VUx0ZBubu6aBE9KmunpaTH9T548keebzUZOUlCtDkuQxcORkeGOgAlScr9cTuV829ubckEcHBy6pldn5KPij7+xdMNNTU5l5y32wjSFJqr6qWJquyLrxcUlUTjI8/z5c4nQR0fHcsKxETShgNvbWx2mn+Mx//i4aZpIKismsd7HLVhZWZGgCn9VJgNQUf9X26u5p/WnbuT/quLbNlHsxIhauGCKmSkhqP8IJPWJ5Gu1uidP3ROsJFH8pFezk5OakOjJk2V39+49NzxczT87ikmQBKFJScWAqCMjI6KG3cGSfm0h5XUo7wMFn5qalAsCFQ8zXUcSkFUq1Q5nxdJTBYJq6IuNdbfmFROSBhIE8w4JdeYIIpFuevx42fumt4SAShjuLywsutrJUe5zhmNSITXEV39URDG7L05Gk7TVhFtaWpSLQqdWeS8QlYzCaVO5RtQiRJGeSK8OXolZb9YbEjxVKkNuyJtrl5ENNcQPrddrYtpJ9D94cCL5UPKi6gLMzs54FdwW9WWcQEjnhr1v2mpU8mBLSYpKMvbi4oIn6XU5JvihAXvencDnHfNBHRdCR+RvRC2aojZc/eTYk7Qm+rawMC/J95AXTTPFa8o8vc40YaZJ4j948MDdvn1bAiox7Z7ck1MzgeBQMQke8JA32d0FLwcHpLyO3M2bt8VtiN0IsOX9Xc6ReDWfX1iQlFij1cgCPj9qK3EtI2qBfFSXyty9To+ickpSyKf5zKC0FYn8AWTFh1xfXxe1ZX6fb4F98iAtC5oqQ0OulKQd3xf+LNOtBGJ6MWhwBUGfrjwV039tYU78VvF3k1KWngoXQHBPjKjFiPr9D1+tjooqQjqWmyFCv379ppBXCdSdkMcUs6GyROuQdhISl9KO5CyUgrxpZPa5IMjRxm6DThBA0uXlZSF/2T/mwnm8/Ni7IkNudGzUTY5PutSfo2lTqMVLUKGeS0tLOekoxTs+ronfyNRpTFQllarl8PCwuAoce+LJNZwO9w3Y9HguAK1RVdXG5DPv//jx46xeNZX39nJv3710++JOpH6D3NQdjIyMeY/VFLUwIIeZpk1RPfxN1AyyspE7xewyZ496qv8Yq6DWrELYbhKf5hLpaxwPMVFk1BzXgiwBkwPMeEFWgjjytPq+Hj165O7f/4/4rUbUApl+3SAIBKDgZGsrRO+kh3RWitI9FA01VIIqKTHFSQ8S9jqX3ufQmj/HoTfvEP3+/fuitl2XkmgyM2LMXD19+tT7t6+yOtd5I2pRgqlAOCcBVPgsYU7+1asDMefBpzzy5D2Q4mgmAEbHJ6T0b8TfR4mZceomJX4uSnh0dCiqXfbkZkpWFLQZWlEoNWHOfnxi3Lu2IVDSNpXcw80CJtSTCwU/msxDTHojahHSU0lJSEXQQg6UYIZKKS27Qz2Hh8dF8bgfCBb+m1Gd6VKviKhplZkqKXUK7gCq9/z5M7kVF0F6qKbdde/3lodCNX8iqauKHBNH/bEABP+1JIRF3SEpF4f6zkbUwhDVSc0oLSeBoHVRzTCVOSX3IWiY/mz/XzjVsiaVVM3MBUiywhZPMMbDPHMcr9VrdVFDVPre3XuuVC61fdpWLwuVZMUsLZnWXV9/IeNB6E8++URckHq9YUQtCjY3N8Tvq9UaQkiS78wwoVpJlPvUPichUZrkpG3XjLpMTUt5PjYUowRftpRF7QRDuBAoa8O1/dru9pOQaz2Uaqrd3eAv8/6I+EPu1dJThfJRUSpmncbGRt2tW3e8SdXcZjMjZ49kU6uzxbqZB1WhEipUTJW8Qrf9zVCZlUjif3d71837QGgoy9Ni9Gukt7JKf1SXKP/g4JUovNa1an1BKA+0Cv9CIZTVOSECJI0JOUg9HaY/rsiH4BB1dnYuTz3FEb8EZ7UTOW8zKwaQfzmTVVlVswAtuBwV8Z85jgmA0CR4nAVuxaz1K7CPGn5wTDI9UPQxhY7ToXONA4FQZoIuVBLzTEEJvmq4GNJMcZvi+4ailfZsF0SFgJybWSuOZ8ydnS3vnmyJulKzitJi/plN04vAiFoA4I+uroZAamVlWYhGPpUKKjYIi6/Z6UO2E/8oHfP+ujKKprvAtWuLXqUnskzCoTzP+EwgaB9/PEXL/dicQ+bFxet+3BlP+NXgr+7tOrfCohb3C6mqhfVRqeDHxGq3KOkfNjXlEC+Y31iB06wyv5mrJ1kCbZvWmlNANwCbqp+OGT/u18evvijj4p/S1rK2uibrATDdSrOgEbVApp+5eopSUD3MLRtKqcGNaGgWvfM8s0X1eljeBzPM8XE3qfqi3OIOhDRTu/GP5xTc5zzashKrd5iidRJQqd+LOh/vHvuL6th81CJBo2dmfiYmpryZzaZExQw3c5KSswzmd0vaovEjyWeSeFd1JdjRgCgugNbCE71tkzDNK7TIlaLk3Nf1A4aGynJR6PnDPoei8Ky4YkQtlqZGhG1KW0jcwgyBCWTIte5LxX1LfFHapLUQBVWkQwBl5LXu4pTYB9UJAB6zP2MouXmMYmLWmRwgGIOQnb3/ibStzMzMGlGL5KPGkXf8XJItQsGEACTEf+Xx3NysV9JbWS9/8CNplUZpcQNQSIjb7XdCUBRT1RJAStSS4IrXQ/C0KK6EZCHW17yK7knBNOOh4tPTs3IxMA7ENqIWzgXoXqmkla/kB/EgIFX8NOAlSVkUF6KgtLRJo4zkYnWSQE19fBEwDsSWQmpPUIpMKNnDZYCc2j3AawRnTJOuvXjuNjc2ZSxcDtJnnCv4yqaohQ2s1GRveHKsrj4X4kGMMLU6m/uurJ6CkqJ8mGciclpaMNc6BsEZpNQACaKizIHQTTH5EJRxUFuIiVpyyzkrQxV348YtN1Idk0Uw8E9JpeEbF7Ur1YgaBTgQDCVVklJQTdCkETxrUWnyHZMN6UZHR+Q+QQ+kRPEIfqSXKsoGcIwqtCb/SY3pmgJsvKatLmzarwXJ2e8iC6oZUT8yooZ1S/e9WT8WPxD1QgEhh5KYNVOVpJoXJVeqpp7ClL29rTx44ti4k5UxVFUhJfe1iEVJjv+KWitUQbWSK84qGFELGEyFRXlPJFCK6z4hGWqH36qk0sCJ25DsD+TR1hJ80Pi7CeO2pEY1rPIXXuMc1JoyDmv+4wawD/szvpISl4DOVUjbPYtlRC2Yj8qm7SAoGxE/jyEPKqpmF8JAJKJ9onFVuXK5IiRlf3xaVWlN7APNl6pPrH4sr+vyQJxbN1VzLd4u4hy/ETVSVlWo6alpqfanjQRfNZ5VwmekY3V6eso9fPgoU9RSPnMFAbe3tvNuU/V7dbaLsbiPKrO+lJp/CMjzKKm2UWsqS81+iPwbhf6dijsz1bl8n/QxDfsI/vadu24za/0gVYVSYq5ZwIzeJwIqFoigKqpUCkXWeA87u1tu/+WuzB7FgTl+qa7U12jUZKl0AjDGxrK315uq5RdNr/aU9oVlPmqhfNReaHgSjGSFILqGaShOSXNVa7VCcYpOwdJ7dXCwL9OsNO9ps54WoLAoL6QMbVUtCZaoL9CV/pSQGnid9g8n4k7WoqG4K05HqaMYQsh6u8JJO0R1X8w9eVOIiO/67NlT9+TJiifrsStn/fbtFQBD6on7pKNK2Qoo+L+hjrWW+69nEbTo/4+q0Cul9LvbjzTqf6KIkBSzjm9JEcmsf44VUzRqp6hkZ2dTJgh0ihSiMpfPqoDhH1WU85kmTVHFq1q/fn4n6mxELVKk30GEaP39qNO0m7AaxeOzkmeliARiQdzp6UlRVkBGALKSD4Vw+p9VICuPmXqltlQ7Tklxobhts95yvZr4Eltxuog+anKWzr72+eJ6U4hFvlT8p8yPJZpHLbUIm/a96khVZql0P1JQHLu3ty9qSpUW6SxSUHG9qjvjfRhRC+Sjuj7KOahvq9OZWjVFxT+mfnd3R5r/Jjxxl5Zu5HWqSnTSUHS/tltbXOHTT0bUfhF+o9VHR88zxuvkmp+/JlsMVgjsOtKYZ1G/wRT1o/JRDaaoBoMR1WBENRiMqAaDBVMGU1SDwYhqMBhRDeajmo9qMEU1GK5UUd8W/vrrLympo0XkPPj555/dl19+mZfjXcWYMXTFFM7xpo9h4YsYNBry79i7x+SWz/b9999f6XdpRB0AfPkUHr9vY1LhHy8W8abAeYCSjzpWLkJuP/vss459eY4VWN7md2lEvST6qcq7xFUoGURDUZWQH5o6fvTBVK/zoRB//PFHrhJffPFFbup/+eWX/DGLjf3999+yaAQdoNqrpGPymv7wkODTTz/Nn2d/2ku4Zbxe74v3wb56vn7jYcLZl/30Pu+d98ftt99+21fx4s/PcRRq81w8Znen6lmf24KptwC+dCXjd999Jz1J/CgKiKL/FOLPP/90X3/9tezHeqaxyf7nn3/k8Q8//CCv4/MpyXj+4cOH7quvvupJUjXNvA/GhaSnjRe7C9xnbI5jX9pXun3RmJicg+3HH3+Utmslfz8X5KzPbUR9S2A9KLo3w3+0c/JD6Ap5MVCVeD9uUZc4WOHY2KzGhGH/firHhfDbb78JaXSMs8aLEb8XVK9f3xQXAGRjg9TsG1+UvXDW5zYf9S0BQvLDojIxUKb4B2EfftgY8WNVNiUTx8evdx/brXSQKFaqs8a7Ch/17t277vfff++r8oN8biPq23rz5XKuNLG5705Hsd9pKzXzw/ODq/JAtEFXduYY/MqffvpJzq3qe9HxzkPWQb6fj2WF6g/a9Gvkqz8G91GZXvuheOoScBuncPBtcSMUBGfx40FIg+lXU3zZ8QYBwR2f66zv57TPHb9mUf8VIQ5I1Gf7/PPPJcjB9EMOTC3P6Wp6+h5pV4ZI5B7xHSENroG2PXPMr7/+KkTTJR/v3LnTMUbvlUvar2OKOf+///576ni9xozH7nUuzSqoi8N4XBzffPPNqWOe9bl5f6wpoEHZ+4zklP52SIyjhx2d9/v9t/uKTt6TpTtQBfUDTwsWdD9I3st06oWgJvuyuOrxLvv99PvcbzO9yIXRQcAk+X9/s4HA81ZxrXsJ4UeR8Nc17y+731UT6l0T9Lzfj/moBoMR1WBENRiMqAbD4LAKf4MpqsFgRDUYUQ2Gj8ZH7Z5hMBjetaISMTXtqzK8ITTdAEt+pwMMwjredfs+DW8I9YxjzcsQtZUNcmLfp+EN4STjWOuiPmoz22D8UZIkNKJP+I0S8aqzf/hruLiCHvntwG/72f16xLcLBVMwvZYNCo79VsmOs4yB4aI+aT1TUiVszZ3xr2LKAwRRtegxRC1lW2LfueECUHdSY59atp0aVJUHHFRv04ygpqaGq4j0m1EgdWEftRXdxkQ1GK6SsN1cu7CixreWTzW8E5hCGj4IdCiqle0ZTFENBiOqwYhqMBhRDQYjqsGIajAYUQ0GI6rhw8T/BBgAMlAZRpNGowIAAAAASUVORK5CYII=" | |
}, | |
MIME_TYPES: { | |
epub: "application/epub+zip", | |
pdf: "application/pdf", | |
jpg: "image/jpeg", | |
jpeg: "image/jpeg", | |
png: "image/png", | |
gif: "image/gif", | |
svg: "image/svg+xml", | |
otf: "application/x-font-opentype", | |
ttf: "application/x-font-ttf", | |
woff: "application/font-woff", | |
acsm: "application/vnd.adobe.adept+xml", | |
m4a: "audio/mp4", | |
aac: "audio/mp4", | |
mp3: "audio/mpeg", | |
ogg: "audio/ogg", | |
oga: "audio/ogg", | |
wav: "audio/x-wav", | |
mp4: "video/mp4", | |
m4v: "video/mp4", | |
webm: "video/webm", | |
ogv: "video/ogg" | |
}, | |
MISC: { | |
COLLECTION_CATEGORY: "collection", | |
SUBSCRIPTION_CATEGORY: "subscription", | |
SYSTEM_CATEGORY: "system", | |
COLLECTION_NAME_MAX_LENGTH: 255, | |
NICKNAME_MAX_LENGTH: 23, | |
SEARCH_TERM_MIN_LENGTH: 3, | |
DIALOG_FADEOUT_TIME: 3e3, | |
DOUBLE_TAP_MAX_DELAY: 250, | |
LONGPRESS_MIN_DURATION: 600, | |
TAP_TRESHOLD: 6, | |
SWIPE_TRESHOLD: 75, | |
PROTECTION_TYPE: { | |
ACS4: "Adobe DRM", | |
ACSM: "Adobe DRM", | |
TDRM: "DRM", | |
NONE: "Unprotected", | |
WATERMARK: "Watermark" | |
}, | |
UI_ACTION_TYPE: { | |
NONE: 0, | |
DELETE_TITLE: 1, | |
DELETE_TITLES: 2, | |
ADD_TO_COLLECTION: 3, | |
ADD_TO_DEFINED_COLLECTION: 4, | |
REMOVE_FROM_COLLECTION: 5, | |
CHOOSE_COLLECTION_TO_ADD: 6, | |
CREATE_COLLECTION: 7, | |
CREATE_COLLECTION_WITH_SELECTION: 8, | |
DELETE_COLLECTION: 9, | |
DELETE_COLLECTIONS: 10, | |
RENAME_COLLECTION: 11, | |
MARK_AS_FINISHED: 12, | |
SHARE: 13, | |
EDIT_NICKNAME: 14, | |
LEAVE_FAMILY: 15, | |
REMOVE_FROM_FAMILY: 16 | |
} | |
}, | |
NET: { | |
BACKEND_BASE_URL: "https://bosh.pageplace.de/bosh/rest", | |
CLIENT_TYPE: "TOLINO_WEBREADER", | |
HARDWARE_TYPE: "[test] React Client", | |
RESELLER_GROUP: 27, | |
REST: { | |
ENDPOINT_CONFIG: "v2/resellerconfig", | |
ENDPOINT_COUNTRY: "reseller/countries/", | |
ENDPOINT_INVENTROY: "inventory", | |
ENDPOINT_REGISTER_HW: "v2/registerhw", | |
ENDPOINT_RESELLERS: "reseller/selection/" | |
}, | |
SIMULATOR: { | |
OAUTH_CLIENT_ID: "simulatorId", | |
OAUTH_SCOPE: "simulatorScope", | |
OAUTH_TOKEN_DEMO_USER: "RGFzIGlzdCBlaW4gRGVtby1Ub2tlbg==", | |
RESELLER_ID: 1, | |
URL_OAUTH_AUTHORIZATION: "https://simulator.prodref.pageplace.de/oauth-simulator/", | |
URL_OAUTH_REDIRECT: "http://127.0.0.1:3000", | |
URL_OAUTH_REVOKETOKEN: "https://simulator.prodref.pageplace.de/oauth-simulator/oauth/revoke", | |
URL_OAUTH_ACCESSTOKEN: "https://simulator.prodref.pageplace.de/oauth-simulator/oauth/token" | |
}, | |
METADATA: { | |
SYNC_PATH: { | |
DOGEAR: "/dogears", | |
COMMENT: "/comments", | |
BOOKMARK: "/bookmark", | |
TAG: "/tags" | |
}, | |
SUBSCRIPTION_CATEGORY: "subscription", | |
TAG_FINISHED_HEARINGS: "collection_finished_hearing_name", | |
TAG_FINISHED_READINGS: "collection_finished_readings_name", | |
TAG_FAMILY_SHARING_EBOOK: "collection_family_sharing_name", | |
TAG_FAMILY_SHARING_AUDIO: "collection_family_sharing_audio", | |
SYNC_OP: { | |
ADD: "add", | |
REMOVE: "remove", | |
REPLACE: "replace" | |
}, | |
SHELF_REVISION: "shelf_revision", | |
SHELF_SYNC_TIME: "shelf_sync_time", | |
SYNC_DEFAULTS: { | |
"/bookmark": { | |
progress: 0 | |
}, | |
"/dogears": {}, | |
"/comments": {}, | |
"/tags": {} | |
}, | |
SYNC_VALUES: { | |
"/bookmark": { | |
revision: "revision", | |
modified: "modified", | |
progress: "progress", | |
position: "rmsdkPosition", | |
currentPosition: "currentPage", | |
lastPosition: "lastPage" | |
}, | |
"/dogears": { | |
revision: "revision", | |
modified: "modified", | |
position: "rmsdkPosition", | |
name: "displayName" | |
}, | |
"/comments": { | |
revision: "revision", | |
modified: "modified", | |
startPosition: "rmsdkPosition", | |
endPosition: "endPosition", | |
note: "markerComment", | |
text: "markedBookText" | |
}, | |
"/tags": { | |
revision: "revision", | |
modified: "modified", | |
name: "name", | |
category: "category" | |
} | |
} | |
} | |
}, | |
READER: { | |
CONTAINER_ID: "rxContainer", | |
SPACER_CLASSNAME: "rxVSpace", | |
LAUNCHER_UI_ID: "koboReadingExperience", | |
MIN_HEIGHT: 240, | |
IMG_HEIGHT_PADDING: 32, | |
SLIDER_PRECISION: 4, | |
SLIDER_UPDATE_INTERVAL: 50, | |
SMIL_ID: "rxMediaOverlay", | |
STYLES_SHEET_ID: "ePubReaderCSS", | |
SYNC_BOOKMARK_DELAY: 1e3, | |
TIMEOUT_PAGE_LAYOUT: 400, | |
TAP_AREA_PAGING: .2, | |
UI_FADEOUT_TIME: 3e3, | |
UI_FADEOUT_TIME_TOUCH: 5e3, | |
ANNOTATIONS: { | |
COMMENT_COLOR: "rgba(255, 253, 110, .6)", | |
DOGEAR_CLASSNAME: "rx-dogear", | |
SEARCHMARK_COLOR: "rgba(162, 203, 229, 1)", | |
TEXT_SAMPLE_MAX_LEN: 80 | |
}, | |
FONT: { | |
DEFAULT_SETTINGS: { | |
fontFamily: "default", | |
fontSizeIdx: 8, | |
lineHeight: "default", | |
textAlign: "default", | |
backgroundMode: "rx-bg-normal", | |
readingMode: "paged" | |
}, | |
CUSTOM_SHEET_ID: "rxCustomFonts", | |
PUBLICATION_SHEET_ID: "rxPublicationFonts", | |
BASE_PATH_FONTS: "assets/fonts/", | |
CUSTOM: { | |
bitter: { | |
id: "bitter", | |
name: "Bitter", | |
preview: "<path d='M2-1.28L0.64-0.96L0.64 0L5.2 0C7.84 0 9.28-0.96 9.28-3.2C9.28-4.48 8.48-5.42 6.8-5.81C8.14-6.14 8.88-6.96 8.88-8.4C8.88-10.32 7.44-11.2 5.44-11.2L3.6-11.2L0.64-11.12L0.64-10.24L2-9.92ZM3.6-6.4L3.6-9.92L5.36-9.92C6.4-9.92 7.2-9.36 7.2-8.24C7.2-6.96 6.24-6.4 4.8-6.4ZM3.6-1.28L3.6-5.2L4.8-5.2C6.56-5.2 7.6-4.72 7.6-3.12C7.6-1.92 6.8-1.28 5.28-1.28ZM11.76-11.12C11.76-10.4 12.16-10 12.8-10C13.28-10 13.84-10.4 13.84-11.12C13.84-11.92 13.44-12.24 12.8-12.24C12.24-12.24 11.76-11.84 11.76-11.12ZM14.88-0.88L13.68-1.28L13.68-8.48L10.72-8.4L10.72-7.52L12.08-7.2L12.08-1.28L10.72-0.88L10.72 0L14.88 0ZM21.28-8.4L18.96-8.4L18.96-10.74L17.36-10.42L17.36-8.4L15.76-8.24L15.76-7.2L17.36-7.2L17.36-2.16C17.36-0.37 18.24 0.16 19.2 0.16C20 0.16 20.72-0.11 21.44-0.64L21.01-1.49C20.59-1.26 20.14-1.09 19.76-1.09C19.31-1.09 18.96-1.33 18.96-2.06L18.96-7.2L21.28-7.2ZM27.6-8.4L25.28-8.4L25.28-10.74L23.68-10.42L23.68-8.4L22.08-8.24L22.08-7.2L23.68-7.2L23.68-2.16C23.68-0.37 24.56 0.16 25.52 0.16C26.32 0.16 27.04-0.11 27.76-0.64L27.33-1.49C26.91-1.26 26.46-1.09 26.08-1.09C25.63-1.09 25.28-1.33 25.28-2.06L25.28-7.2L27.6-7.2ZM35.92-4C35.92-4.03 36-4.48 36-4.88C36-7.28 34.96-8.64 32.64-8.64C30.32-8.64 28.72-6.72 28.72-4.16C28.72-1.52 30 0.16 32.56 0.16C34.48 0.16 35.97-1.17 35.97-1.17L35.41-2C35.41-2 34.32-1.12 32.72-1.12C31.34-1.12 30.4-2.24 30.4-4ZM30.46-5.2C30.56-6.4 31.28-7.39 32.56-7.39C33.84-7.39 34.3-6.4 34.3-5.2ZM40-8.48L37.36-8.4L37.36-7.52L38.72-7.2L38.72-1.28L37.36-0.88L37.36 0L41.92 0L41.92-0.88L40.32-1.28L40.32-6.03C40.67-6.5 41.44-7.28 42.64-7.28L42.88-6.08L43.92-6.08L44-8.4C44-8.4 43.36-8.64 42.56-8.64C41.47-8.64 40.54-7.76 40.14-7.31Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "Bitter-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "Bitter-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "Bitter-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "Bitter-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
droidSerif: { | |
id: "droidSerif", | |
name: "DroidSerif", | |
preview: "<path d='M0.61 0L0.61-0.67L0.81-0.67Q1.09-0.67 1.32-0.71Q1.56-0.75 1.74-0.87Q1.92-0.99 2.02-1.22Q2.13-1.45 2.13-1.82L2.13-9.66Q2.13-10.02 2.02-10.23Q1.91-10.45 1.73-10.56Q1.55-10.68 1.32-10.71Q1.08-10.75 0.81-10.75L0.61-10.75L0.61-11.42L5.51-11.42Q6.74-11.42 7.71-11.04Q8.68-10.66 9.35-9.94Q10.02-9.21 10.37-8.15Q10.72-7.09 10.72-5.73Q10.72-4.41 10.39-3.36Q10.06-2.3 9.41-1.55Q8.77-0.8 7.79-0.40Q6.81 0 5.51 0L0.61 0M3.74-0.81L5.13-0.81Q6.09-0.81 6.8-1.14Q7.52-1.46 7.99-2.09Q8.47-2.71 8.71-3.63Q8.95-4.54 8.95-5.73Q8.95-8.11 8-9.37Q7.05-10.63 5.15-10.63L3.74-10.63L3.74-0.81ZM11.25 0L11.25-0.67L11.3-0.67Q11.57-0.67 11.81-0.71Q12.05-0.75 12.22-0.87Q12.4-0.99 12.5-1.22Q12.61-1.45 12.61-1.82L12.61-6.81Q12.61-7.16 12.5-7.38Q12.4-7.59 12.22-7.71Q12.04-7.83 11.8-7.87Q11.56-7.91 11.3-7.91L11.25-7.91L11.25-8.58L13.71-8.58L14.02-6.99L14.09-6.99Q14.25-7.35 14.41-7.67Q14.58-7.98 14.82-8.22Q15.05-8.46 15.41-8.60Q15.76-8.73 16.29-8.73Q17.16-8.73 17.59-8.43Q18.02-8.13 18.02-7.57Q18.02-7.32 17.93-7.11Q17.85-6.9 17.67-6.75Q17.49-6.59 17.21-6.51Q16.93-6.43 16.52-6.43Q16.52-7.09 16.34-7.39Q16.15-7.68 15.68-7.68Q15.38-7.68 15.15-7.51Q14.91-7.34 14.74-7.07Q14.56-6.79 14.44-6.43Q14.32-6.07 14.25-5.69Q14.17-5.31 14.14-4.94Q14.11-4.56 14.11-4.26L14.11-1.74Q14.11-1.39 14.21-1.18Q14.32-0.96 14.5-0.85Q14.68-0.74 14.92-0.71Q15.16-0.67 15.42-0.67L15.87-0.67L15.87 0L11.25 0ZM18.9-4.30Q18.9-6.55 19.85-7.64Q20.8-8.73 22.66-8.73Q23.52-8.73 24.21-8.46Q24.9-8.2 25.38-7.64Q25.86-7.09 26.11-6.26Q26.37-5.43 26.37-4.30Q26.37-2.05 25.41-0.95Q24.45 0.16 22.61 0.16Q21.74 0.16 21.05-0.12Q20.37-0.39 19.89-0.95Q19.41-1.5 19.15-2.34Q18.9-3.18 18.9-4.30M20.45-4.30Q20.45-3.41 20.56-2.73Q20.68-2.05 20.94-1.60Q21.2-1.14 21.62-0.91Q22.04-0.67 22.64-0.67Q23.24-0.67 23.66-0.91Q24.07-1.14 24.33-1.60Q24.59-2.05 24.7-2.73Q24.81-3.41 24.81-4.30Q24.81-5.2 24.7-5.87Q24.58-6.54 24.32-6.99Q24.06-7.44 23.64-7.66Q23.23-7.89 22.63-7.89Q22.02-7.89 21.61-7.66Q21.2-7.44 20.94-6.99Q20.68-6.54 20.56-5.87Q20.45-5.2 20.45-4.30ZM26.73 0L26.73-0.67L26.95-0.67Q27.21-0.67 27.45-0.71Q27.69-0.74 27.87-0.85Q28.05-0.96 28.15-1.18Q28.26-1.39 28.26-1.74L28.26-6.81Q28.26-7.16 28.15-7.38Q28.05-7.59 27.87-7.71Q27.69-7.83 27.45-7.87Q27.21-7.91 26.95-7.91L26.9-7.91L26.9-8.58L29.76-8.58L29.76-1.82Q29.76-1.45 29.86-1.22Q29.97-0.99 30.14-0.87Q30.32-0.75 30.56-0.71Q30.8-0.67 31.07-0.67L31.28-0.67L31.28 0L26.73 0M28.03-11.17Q28.03-11.45 28.1-11.64Q28.17-11.83 28.3-11.95Q28.42-12.06 28.59-12.11Q28.75-12.16 28.95-12.16Q29.13-12.16 29.3-12.11Q29.46-12.06 29.58-11.95Q29.7-11.83 29.78-11.64Q29.85-11.45 29.85-11.17Q29.85-10.89 29.78-10.70Q29.7-10.52 29.58-10.40Q29.46-10.28 29.3-10.23Q29.13-10.18 28.95-10.18Q28.75-10.18 28.59-10.23Q28.42-10.28 28.3-10.40Q28.17-10.52 28.1-10.70Q28.03-10.89 28.03-11.17ZM32.16-4.27Q32.16-5.43 32.38-6.27Q32.59-7.12 33-7.66Q33.41-8.21 34.02-8.47Q34.63-8.73 35.42-8.73Q35.88-8.73 36.26-8.63Q36.63-8.53 36.93-8.34Q37.23-8.16 37.47-7.90Q37.7-7.64 37.88-7.33L37.97-7.33Q37.95-7.72 37.92-8.06Q37.91-8.36 37.89-8.65Q37.88-8.95 37.88-9.09L37.88-10.40Q37.88-10.75 37.77-10.96Q37.66-11.18 37.48-11.30Q37.3-11.41 37.07-11.45Q36.83-11.48 36.56-11.48L36.43-11.48L36.43-12.16L39.38-12.16L39.38-1.76Q39.38-1.41 39.48-1.19Q39.59-0.98 39.77-0.86Q39.95-0.74 40.18-0.71Q40.42-0.67 40.69-0.67L40.82-0.67L40.82 0L38.11 0L37.94-1.44L37.88-1.44Q37.7-1.07 37.46-0.78Q37.23-0.48 36.94-0.28Q36.64-0.07 36.27 0.04Q35.89 0.16 35.42 0.16Q34.63 0.16 34.02-0.11Q33.41-0.37 33-0.91Q32.59-1.45 32.38-2.29Q32.16-3.13 32.16-4.27M33.71-4.26Q33.71-2.55 34.17-1.71Q34.63-0.87 35.7-0.87Q36.32-0.87 36.74-1.07Q37.16-1.28 37.41-1.70Q37.66-2.13 37.77-2.77Q37.88-3.41 37.88-4.27Q37.88-5.11 37.77-5.75Q37.66-6.39 37.41-6.82Q37.16-7.26 36.73-7.48Q36.31-7.71 35.68-7.71Q35.16-7.71 34.78-7.48Q34.41-7.26 34.17-6.82Q33.93-6.38 33.82-5.74Q33.71-5.09 33.71-4.26ZM41.59-2.09Q41.59-2.58 41.89-2.88Q42.19-3.17 42.74-3.17Q42.77-2.67 42.89-2.21Q43.02-1.75 43.28-1.40Q43.54-1.05 43.94-0.84Q44.34-0.63 44.9-0.63Q45.98-0.63 46.58-1.14Q47.19-1.66 47.19-2.64Q47.19-3.08 47.06-3.41Q46.94-3.75 46.65-4.04Q46.36-4.32 45.89-4.58Q45.41-4.84 44.71-5.13Q43.97-5.44 43.41-5.79Q42.86-6.13 42.49-6.56Q42.13-6.98 41.95-7.51Q41.77-8.03 41.77-8.69Q41.77-9.38 42.03-9.91Q42.29-10.45 42.76-10.82Q43.23-11.2 43.87-11.39Q44.51-11.59 45.27-11.59Q45.98-11.59 46.54-11.44Q47.09-11.29 47.48-11.04Q47.86-10.79 48.06-10.46Q48.26-10.14 48.26-9.79Q48.26-9.27 47.92-9.01Q47.58-8.75 47-8.75Q47-9.13 46.91-9.49Q46.82-9.85 46.61-10.14Q46.4-10.42 46.05-10.60Q45.71-10.78 45.2-10.78Q44.74-10.78 44.38-10.65Q44.02-10.52 43.77-10.29Q43.52-10.05 43.38-9.71Q43.25-9.38 43.25-8.96Q43.25-8.48 43.38-8.12Q43.5-7.76 43.79-7.46Q44.09-7.17 44.56-6.91Q45.04-6.65 45.73-6.37Q46.44-6.08 46.99-5.76Q47.54-5.44 47.92-5.04Q48.3-4.65 48.51-4.16Q48.71-3.67 48.71-3.05Q48.71-2.3 48.43-1.70Q48.16-1.1 47.64-0.69Q47.13-0.27 46.4-0.06Q45.67 0.16 44.77 0.16Q43.99 0.16 43.39-0.01Q42.8-0.17 42.39-0.46Q41.99-0.76 41.79-1.18Q41.59-1.59 41.59-2.09ZM49.59-4.23Q49.59-6.47 50.52-7.60Q51.44-8.73 53.14-8.73Q53.91-8.73 54.53-8.49Q55.15-8.25 55.58-7.77Q56.01-7.29 56.24-6.57Q56.47-5.86 56.47-4.91L56.47-4.18L51.14-4.18Q51.16-3.3 51.32-2.68Q51.48-2.05 51.78-1.64Q52.08-1.23 52.52-1.04Q52.95-0.85 53.52-0.85Q53.94-0.85 54.29-0.95Q54.65-1.04 54.94-1.20Q55.23-1.35 55.45-1.55Q55.67-1.75 55.81-1.97Q55.92-1.92 56.02-1.77Q56.12-1.63 56.12-1.42Q56.12-1.18 55.95-0.90Q55.77-0.63 55.42-0.39Q55.07-0.16 54.54 0Q54.02 0.16 53.3 0.16Q52.44 0.16 51.75-0.14Q51.05-0.43 50.58-0.99Q50.1-1.55 49.85-2.37Q49.59-3.19 49.59-4.23M51.17-5.04L54.85-5.04Q54.85-5.67 54.76-6.20Q54.66-6.72 54.46-7.09Q54.26-7.47 53.93-7.67Q53.59-7.88 53.11-7.88Q52.22-7.88 51.74-7.15Q51.26-6.43 51.17-5.04ZM57 0L57-0.67L57.05-0.67Q57.32-0.67 57.56-0.71Q57.8-0.75 57.97-0.87Q58.15-0.99 58.25-1.22Q58.36-1.45 58.36-1.82L58.36-6.81Q58.36-7.16 58.25-7.38Q58.15-7.59 57.97-7.71Q57.79-7.83 57.55-7.87Q57.31-7.91 57.05-7.91L57-7.91L57-8.58L59.46-8.58L59.77-6.99L59.84-6.99Q60-7.35 60.16-7.67Q60.33-7.98 60.57-8.22Q60.8-8.46 61.16-8.60Q61.51-8.73 62.04-8.73Q62.91-8.73 63.34-8.43Q63.77-8.13 63.77-7.57Q63.77-7.32 63.68-7.11Q63.6-6.9 63.42-6.75Q63.24-6.59 62.96-6.51Q62.68-6.43 62.27-6.43Q62.27-7.09 62.09-7.39Q61.9-7.68 61.43-7.68Q61.13-7.68 60.9-7.51Q60.66-7.34 60.49-7.07Q60.31-6.79 60.19-6.43Q60.07-6.07 60-5.69Q59.92-5.31 59.89-4.94Q59.86-4.56 59.86-4.26L59.86-1.74Q59.86-1.39 59.96-1.18Q60.07-0.96 60.25-0.85Q60.43-0.74 60.67-0.71Q60.91-0.67 61.17-0.67L61.62-0.67L61.62 0L57 0ZM64.13 0L64.13-0.67L64.34-0.67Q64.61-0.67 64.85-0.71Q65.09-0.74 65.27-0.85Q65.45-0.96 65.55-1.18Q65.66-1.39 65.66-1.74L65.66-6.81Q65.66-7.16 65.55-7.38Q65.45-7.59 65.27-7.71Q65.09-7.83 64.85-7.87Q64.61-7.91 64.34-7.91L64.3-7.91L64.3-8.58L67.16-8.58L67.16-1.82Q67.16-1.45 67.26-1.22Q67.37-0.99 67.54-0.87Q67.72-0.75 67.96-0.71Q68.2-0.67 68.47-0.67L68.68-0.67L68.68 0L64.13 0M65.43-11.17Q65.43-11.45 65.5-11.64Q65.57-11.83 65.7-11.95Q65.82-12.06 65.98-12.11Q66.15-12.16 66.34-12.16Q66.53-12.16 66.7-12.11Q66.86-12.06 66.98-11.95Q67.1-11.83 67.18-11.64Q67.25-11.45 67.25-11.17Q67.25-10.89 67.18-10.70Q67.1-10.52 66.98-10.40Q66.86-10.28 66.7-10.23Q66.53-10.18 66.34-10.18Q66.15-10.18 65.98-10.23Q65.82-10.28 65.7-10.40Q65.57-10.52 65.5-10.70Q65.43-10.89 65.43-11.17ZM69.11 0L69.11-0.67L69.32-0.67Q69.59-0.67 69.83-0.71Q70.07-0.75 70.25-0.87Q70.42-0.99 70.53-1.22Q70.63-1.45 70.63-1.82L70.63-7.82L69.17-7.82L69.17-8.58L70.63-8.58L70.63-9.38Q70.63-10.09 70.83-10.64Q71.02-11.19 71.39-11.56Q71.76-11.94 72.28-12.13Q72.8-12.32 73.46-12.32Q74.09-12.32 74.52-12.24Q74.95-12.16 75.21-12.01Q75.47-11.86 75.59-11.66Q75.7-11.45 75.7-11.20Q75.7-10.98 75.61-10.82Q75.51-10.65 75.33-10.54Q75.16-10.42 74.92-10.36Q74.68-10.3 74.39-10.30Q74.39-10.55 74.34-10.78Q74.29-11.01 74.17-11.19Q74.05-11.37 73.84-11.48Q73.64-11.59 73.34-11.59Q72.99-11.59 72.76-11.45Q72.53-11.32 72.39-11.06Q72.25-10.8 72.19-10.41Q72.13-10.03 72.13-9.52L72.13-8.58L74.39-8.58L74.39-7.82L72.13-7.82L72.13-1.82Q72.13-1.45 72.24-1.22Q72.34-0.99 72.52-0.87Q72.7-0.75 72.94-0.71Q73.18-0.67 73.45-0.67L74.05-0.67L74.05 0L69.11 0Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "DroidSerif", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "DroidSerif-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "DroidSerif-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "DroidSerif-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
firaSans: { | |
id: "firaSans", | |
name: "Fira Sans", | |
preview: "<path d='M7.36-9.81L7.54-11.02L1.68-11.02L1.68 0L3.2 0L3.2-4.85L6.8-4.85L6.8-6.05L3.2-6.05L3.2-9.81ZM11.2-11.36C11.2-11.92 10.77-12.35 10.16-12.35C9.55-12.35 9.14-11.92 9.14-11.36C9.14-10.78 9.55-10.35 10.16-10.35C10.77-10.35 11.2-10.78 11.2-11.36ZM10.9 0L10.9-8.43L9.42-8.43L9.42 0ZM15.44 0L15.44-4.94C15.73-6.11 16.4-7.18 17.46-7.18C17.76-7.18 17.94-7.15 18.19-7.09L18.46-8.53C18.21-8.59 17.9-8.62 17.63-8.62C16.64-8.62 15.9-8 15.42-6.82L15.25-8.43L13.97-8.43L13.97 0ZM25.63-5.87C25.63-7.58 24.7-8.62 22.56-8.62C21.73-8.62 20.78-8.46 19.74-8.08L20.13-6.99C20.99-7.3 21.78-7.42 22.34-7.42C23.57-7.42 24.16-6.98 24.16-5.79L24.16-5.14L23.07-5.14C20.51-5.14 19.1-4.16 19.1-2.42C19.1-0.85 20.14 0.19 21.84 0.19C22.86 0.19 23.76-0.19 24.35-0.99C24.61-0.24 25.15 0.1 25.9 0.19L26.26-0.83C25.82-0.99 25.63-1.23 25.63-1.9ZM22.24-0.91C21.18-0.91 20.72-1.44 20.72-2.48C20.72-3.5 21.34-4.16 23.15-4.16L24.16-4.16L24.16-2.08C23.68-1.34 23.04-0.91 22.24-0.91ZM39.47-3.07C39.47-5.18 37.97-5.87 36.21-6.42C34.22-7.02 33.79-7.47 33.79-8.4C33.79-9.46 34.67-9.97 35.78-9.97C36.7-9.97 37.49-9.68 38.26-8.98L39.12-9.94C38.22-10.77 37.25-11.22 35.71-11.22C33.65-11.22 32.24-10.03 32.24-8.34C32.24-6.62 33.36-5.81 35.5-5.15C37.36-4.58 37.89-4.06 37.89-3.02C37.89-1.7 36.82-1.06 35.52-1.06C34.32-1.06 33.42-1.49 32.67-2.21L31.79-1.23C32.7-0.34 33.95 0.19 35.57 0.19C38.02 0.19 39.47-1.15 39.47-3.07ZM47.33-5.87C47.33-7.58 46.4-8.62 44.26-8.62C43.42-8.62 42.48-8.46 41.44-8.08L41.82-6.99C42.69-7.3 43.47-7.42 44.03-7.42C45.26-7.42 45.86-6.98 45.86-5.79L45.86-5.14L44.77-5.14C42.21-5.14 40.8-4.16 40.8-2.42C40.8-0.85 41.84 0.19 43.54 0.19C44.56 0.19 45.46-0.19 46.05-0.99C46.3-0.24 46.85 0.1 47.6 0.19L47.95-0.83C47.52-0.99 47.33-1.23 47.33-1.9ZM43.94-0.91C42.88-0.91 42.42-1.44 42.42-2.48C42.42-3.5 43.04-4.16 44.85-4.16L45.86-4.16L45.86-2.08C45.38-1.34 44.74-0.91 43.94-0.91ZM51.86-6.11C52.3-6.77 53.04-7.47 53.95-7.47C54.91-7.47 55.26-7.04 55.26-6.03L55.26 0L56.74 0L56.74-6.13C56.74-7.7 56.08-8.62 54.45-8.62C53.46-8.62 52.45-8.14 51.76-7.28L51.65-8.43L50.38-8.43L50.38 0L51.86 0ZM61.81-0.99C60.91-0.99 60.13-1.3 59.47-1.84L58.66-0.91C59.39-0.27 60.42 0.19 61.84 0.19C63.52 0.19 65.17-0.58 65.17-2.38C65.17-4.02 63.98-4.56 62.5-4.98C61.07-5.36 60.54-5.63 60.54-6.35C60.54-7.02 61.2-7.46 62.11-7.46C63.01-7.46 63.63-7.2 64.24-6.78L64.9-7.78C64.21-8.27 63.33-8.62 62.18-8.62C60.4-8.62 59.02-7.68 59.02-6.26C59.02-4.88 60-4.22 61.52-3.84C63.18-3.42 63.58-3.1 63.58-2.27C63.58-1.49 62.88-0.99 61.81-0.99Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "FiraSansOT-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "FiraSansOT-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "FiraSansOT-RegularItalic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "FiraSansOT-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
openDyslexic: { | |
id: "openDyslexic", | |
name: "OpenDyslexic", | |
preview: "<path d='M6.58-11.87C9.86-11.87 11.97-9.5 11.97-5.82C11.97-2.14 9.86 0.22 6.58 0.22C3.3 0.22 1.17-2.13 1.17-5.82C1.17-9.5 3.3-11.87 6.58-11.87ZM6.58-10.59C4.29-10.59 2.83-8.77 2.83-5.82C2.83-3.41 4.29-2.77 6.58-2.77C8.86-2.77 10.3-3.41 10.3-5.82C10.3-8.77 8.86-10.59 6.58-10.59ZM16.14 3.33L14.3 3.33L15.01-2.03L15.01-8.62L16.45-8.62L16.21-7.42C16.8-8.46 17.73-8.96 19.01-8.96C21.14-8.96 22.59-7.12 22.59-4.37C22.59-1.62 21.14 0.22 19.01 0.22C17.73 0.22 16.8-0.27 16.21-1.31ZM21.66-4.62C21.66-6.74 20.75-8 19.22-8C17.7-8 16.78-6.74 16.78-4.62C16.78-2.5 17.78-2.14 19.3-2.14C20.82-2.14 21.66-2.5 21.66-4.62ZM32.58-4.74L26.05-4.74C26.08-2.4 27.23-2 29.14-1.9C30.24-1.9 31.28-1.89 32.3-2.43L32.34-0.45C31.3 0 30.21 0.22 29.09 0.22C26.3 0.13 24.54-1.52 24.54-4.29C24.66-7.15 26.21-8.96 28.85-8.96C31.18-8.86 32.38-7.78 32.58-5.28ZM31.33-6C31.17-6.98 30.27-8.21 28.85-8.21C27.25-8.21 26.21-7.04 26.21-5.98ZM42.19 0L40.14 0L40.45-5.31C40.45-6.98 39.95-7.79 38.67-7.79C36.91-7.79 36.08-6.74 36.08-5.02L36.32 0L34.32 0L34.56-8.83L36-8.83L36-7.78C36.69-8.32 37.62-8.96 38.83-8.96C40.83-8.96 41.86-7.7 41.97-5.28ZM44.19 0L44.19-11.66L47.44-11.66C51.97-11.66 54-9.84 54-5.84C54-1.82 51.94 0 47.44 0ZM45.86-10.37L45.86-2.94L47.76-2.94C50.98-2.94 52.14-3.62 52.38-6C52.38-8.91 50.98-10.37 47.76-10.37ZM62.26-8.75L63.78-8.75L60.1 0.82C59.07 3.1 58.34 3.49 57.06 3.49L55.74 3.49L55.74 1.58L56.75 1.58C57.54 1.58 57.86 1.18 58.4 0.51L59.01-0.72L55.26-8.75L56.78-8.75L59.89-3.66ZM71.57-7.3C70.75-7.7 69.87-7.92 68.94-7.92C67.5-7.92 66.72-7.39 66.72-6.53C66.72-5.74 67.18-5.38 68.72-5.04L69.22-4.93C71.25-4.5 72.03-3.84 72.03-2.42C72.03-0.78 70.67 0.22 68.42 0.22C67.49 0.22 66.48 0.05 65.34-0.32L65.34-2.43C66.42-1.87 67.44-1.6 68.45-1.6C69.81-1.6 70.4-2.02 70.4-2.77C70.22-3.09 70.08-3.31 69.95-3.46C69.84-3.6 69.33-3.76 68.43-3.97L67.94-4.08C66.16-4.45 65.41-5.02 65.41-6.38C65.41-8.03 66.62-8.96 68.77-8.96C69.84-8.96 70.78-8.8 71.57-8.5ZM77.5 0L74.37 0C74.43-4.05 74.54-7.39 74.77-11.46L76.13-11.46C75.94-8 75.84-5.25 75.81-1.78L77.5-1.78ZM87.87-4.74L81.34-4.74C81.38-2.4 82.53-2 84.43-1.9C85.54-1.9 86.58-1.89 87.6-2.43L87.63-0.45C86.59 0 85.5 0.22 84.38 0.22C81.6 0.13 79.84-1.52 79.84-4.29C79.95-7.15 81.5-8.96 84.14-8.96C86.48-8.86 87.68-7.78 87.87-5.28ZM86.62-6C86.46-6.98 85.57-8.21 84.14-8.21C82.54-8.21 81.5-7.04 81.5-5.98ZM93.81-5.17L96.45-8.75L97.9-8.75L94.82-4.1L98.22 0L95.9 0L93.9-3.04L91.74 0L89.42 0L92.91-4.19L89.87-8.75L91.41-8.75ZM102.16-10.34L100.72-10.34L100.8-12.16L102.08-12.16ZM100.56 0C100.77-3.07 100.82-6 100.8-8.75L102.08-8.75C101.98-6.13 102.06-3.18 102.4 0ZM111.66-7.15C110.85-7.6 110.03-7.82 109.2-7.82C107.33-7.82 106.34-6.5 106.34-4.37C106.48-2.86 107.26-2.35 109.14-2.26C109.97-2.26 110.82-2.14 111.63-2.59L111.66-0.34C110.86 0.03 110.02 0.22 109.04 0.22C106.42 0.22 104.74-1.55 104.74-4.37C104.74-7.22 106.42-8.96 109.14-8.96C110.02-8.96 110.88-8.78 111.66-8.42Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "OpenDyslexic-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "OpenDyslexic-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "OpenDyslexic-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "OpenDyslexic-BoldItalic", | |
weight: 700 | |
}] | |
}, | |
sourceSans: { | |
id: "sourceSans", | |
name: "Source Sans Pro", | |
preview: "<path d='M0.67-1.36C1.58-0.42 2.88 0.19 4.35 0.19C6.56 0.19 7.92-1.14 7.92-2.8C7.92-4.35 6.98-5.07 5.76-5.6L4.27-6.24C3.44-6.59 2.53-6.98 2.53-7.98C2.53-8.93 3.31-9.52 4.48-9.52C5.46-9.52 6.22-9.14 6.86-8.53L7.58-9.39C6.83-10.16 5.73-10.69 4.48-10.69C2.58-10.69 1.18-9.5 1.18-7.9C1.18-6.37 2.32-5.62 3.31-5.2L4.82-4.54C5.81-4.1 6.56-3.76 6.56-2.69C6.56-1.66 5.74-0.98 4.37-0.98C3.28-0.98 2.22-1.5 1.47-2.29ZM9.28-3.87C9.28-1.3 10.98 0.19 12.88 0.19C14.78 0.19 16.48-1.3 16.48-3.87C16.48-6.48 14.78-7.97 12.88-7.97C10.98-7.97 9.28-6.48 9.28-3.87ZM10.64-3.87C10.64-5.66 11.55-6.88 12.88-6.88C14.22-6.88 15.12-5.66 15.12-3.87C15.12-2.1 14.22-0.9 12.88-0.9C11.55-0.9 10.64-2.1 10.64-3.87ZM18.42-2.85C18.42-0.86 19.15 0.19 20.8 0.19C21.87 0.19 22.64-0.37 23.36-1.22L23.41-1.22L23.52 0L24.61 0L24.61-7.78L23.3-7.78L23.3-2.26C22.56-1.34 22-0.94 21.2-0.94C20.18-0.94 19.74-1.57 19.74-3.02L19.74-7.78L18.42-7.78ZM27.23 0L28.54 0L28.54-4.99C29.07-6.3 29.86-6.78 30.51-6.78C30.83-6.78 31.01-6.74 31.26-6.66L31.52-7.81C31.26-7.92 31.02-7.97 30.69-7.97C29.81-7.97 29.01-7.34 28.48-6.37L28.43-6.37L28.32-7.78L27.23-7.78ZM32.05-3.87C32.05-1.3 33.63 0.19 35.7 0.19C36.62 0.19 37.52-0.19 38.22-0.82L37.63-1.68C37.17-1.26 36.54-0.9 35.81-0.9C34.38-0.9 33.41-2.1 33.41-3.87C33.41-5.66 34.43-6.88 35.84-6.88C36.46-6.88 36.94-6.59 37.41-6.19L38.06-7.04C37.54-7.54 36.82-7.97 35.79-7.97C33.79-7.97 32.05-6.48 32.05-3.87ZM39.01-3.87C39.01-1.33 40.66 0.19 42.74 0.19C43.79 0.19 44.62-0.18 45.3-0.61L44.83-1.47C44.26-1.1 43.63-0.86 42.9-0.86C41.41-0.86 40.4-1.92 40.3-3.6L45.55-3.6C45.58-3.79 45.6-4.05 45.6-4.32C45.6-6.54 44.48-7.97 42.5-7.97C40.72-7.97 39.01-6.42 39.01-3.87ZM40.29-4.46C40.45-6.03 41.44-6.93 42.53-6.93C43.74-6.93 44.45-6.05 44.45-4.46ZM50.11-1.36C51.02-0.42 52.32 0.19 53.79 0.19C56 0.19 57.36-1.14 57.36-2.8C57.36-4.35 56.42-5.07 55.2-5.6L53.71-6.24C52.88-6.59 51.97-6.98 51.97-7.98C51.97-8.93 52.75-9.52 53.92-9.52C54.9-9.52 55.66-9.14 56.3-8.53L57.02-9.39C56.27-10.16 55.17-10.69 53.92-10.69C52.02-10.69 50.62-9.5 50.62-7.9C50.62-6.37 51.76-5.62 52.75-5.2L54.26-4.54C55.25-4.1 56-3.76 56-2.69C56-1.66 55.18-0.98 53.81-0.98C52.72-0.98 51.66-1.5 50.91-2.29ZM58.91-2.02C58.91-0.62 59.89 0.19 61.2 0.19C62.16 0.19 63.02-0.32 63.78-0.93L63.81-0.93L63.92 0L65.01 0L65.01-4.77C65.01-6.7 64.21-7.97 62.3-7.97C61.06-7.97 59.97-7.42 59.25-6.96L59.78-6.05C60.38-6.46 61.18-6.88 62.1-6.88C63.36-6.88 63.7-5.92 63.7-4.93C60.38-4.56 58.91-3.71 58.91-2.02ZM60.21-2.11C60.21-3.1 61.09-3.74 63.7-4.06L63.7-1.9C62.94-1.23 62.32-0.86 61.57-0.86C60.8-0.86 60.21-1.23 60.21-2.11ZM67.49 0L68.8 0L68.8-5.63C69.58-6.42 70.13-6.83 70.93-6.83C71.95-6.83 72.4-6.21 72.4-4.75L72.4 0L73.71 0L73.71-4.93C73.71-6.91 72.98-7.97 71.34-7.97C70.27-7.97 69.47-7.39 68.74-6.66L68.69-6.66L68.58-7.78L67.49-7.78ZM75.38-0.88C76.11-0.27 77.17 0.19 78.27 0.19C80.11 0.19 81.12-0.86 81.12-2.13C81.12-3.6 79.87-4.06 78.75-4.48C77.87-4.82 77.02-5.09 77.02-5.82C77.02-6.42 77.47-6.94 78.45-6.94C79.14-6.94 79.7-6.66 80.22-6.26L80.85-7.09C80.26-7.57 79.41-7.97 78.43-7.97C76.75-7.97 75.76-7.01 75.76-5.76C75.76-4.45 76.98-3.92 78.08-3.52C78.93-3.2 79.86-2.85 79.86-2.05C79.86-1.38 79.34-0.83 78.32-0.83C77.39-0.83 76.7-1.22 76.03-1.76ZM86.3 0L87.63 0L87.63-4.16L89.52-4.16C91.82-4.16 93.39-5.2 93.39-7.41C93.39-9.71 91.84-10.5 89.52-10.5L86.3-10.5ZM87.63-5.25L87.63-9.42L89.36-9.42C91.17-9.42 92.06-8.93 92.06-7.41C92.06-5.92 91.18-5.25 89.36-5.25ZM95.39 0L96.7 0L96.7-4.99C97.23-6.3 98.02-6.78 98.67-6.78C98.99-6.78 99.17-6.74 99.42-6.66L99.68-7.81C99.42-7.92 99.18-7.97 98.85-7.97C97.97-7.97 97.17-7.34 96.64-6.37L96.59-6.37L96.48-7.78L95.39-7.78ZM100.21-3.87C100.21-1.3 101.9 0.19 103.81 0.19C105.71 0.19 107.41-1.3 107.41-3.87C107.41-6.48 105.71-7.97 103.81-7.97C101.9-7.97 100.21-6.48 100.21-3.87ZM101.57-3.87C101.57-5.66 102.48-6.88 103.81-6.88C105.15-6.88 106.05-5.66 106.05-3.87C106.05-2.1 105.15-0.9 103.81-0.9C102.48-0.9 101.57-2.1 101.57-3.87Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "SourceSansPro-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "SourceSansPro-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "SourceSansPro-It", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "SourceSansPro-BoldIt", | |
weight: 700 | |
}] | |
}, | |
vollkorn: { | |
id: "vollkorn", | |
name: "Vollkorn", | |
preview: "<path d='M8.94-10.82C8.45-10.82 8.05-10.83 7.58-10.86C7.58-10.69 7.6-10.42 7.66-10.18C8.67-10.06 8.77-9.41 8.37-8.22C7.68-6.18 6.98-4.24 6.18-2.27C5.31-4.45 4.46-6.45 3.6-8.43C2.98-9.87 3.17-10.11 4.19-10.18C4.24-10.4 4.27-10.67 4.27-10.86C3.66-10.83 3.01-10.82 2.34-10.82C1.66-10.82 0.82-10.83 0.4-10.86C0.4-10.69 0.42-10.43 0.48-10.18C1.07-10.11 1.18-9.9 1.89-8.34C2.9-6.11 4.19-3.01 5.44 0.1C5.7 0.1 5.86 0.08 6.06 0.03C7.14-2.75 8.16-5.54 9.15-8.29C9.54-9.34 9.84-10.02 10.5-10.18C10.56-10.42 10.58-10.62 10.58-10.86C10.11-10.83 9.44-10.82 8.94-10.82ZM13.71-7.47C11.58-7.47 10.1-5.84 10.1-3.66C10.1-1.36 11.52 0.14 13.71 0.14C15.87 0.14 17.33-1.47 17.33-3.66C17.33-5.94 15.98-7.47 13.71-7.47ZM13.55-6.7C14.74-6.7 15.73-5.46 15.73-3.47C15.73-1.79 15.12-0.62 13.84-0.62C12.54-0.62 11.71-1.84 11.71-4C11.71-5.6 12.32-6.7 13.55-6.7ZM19.57-2.03C19.57-0.96 19.31-0.64 18.46-0.64C18.4-0.43 18.38-0.16 18.38 0.05C18.91 0.02 19.62 0 20.22 0C20.83 0 21.47 0.02 22.03 0.05C22.03-0.1 22.02-0.42 21.95-0.64C21.26-0.64 21.01-0.96 21.01-2.03L21.01-10.83C21.01-11.23 20.85-11.41 20.66-11.47C20.27-11.2 18.99-10.93 18.51-10.93C18.4-10.75 18.37-10.58 18.37-10.34C19.46-10.34 19.57-9.95 19.57-9.2ZM24.35-2.03C24.35-0.96 24.1-0.64 23.25-0.64C23.18-0.43 23.17-0.16 23.17 0.05C23.7 0.02 24.4 0 25.01 0C25.62 0 26.26 0.02 26.82 0.05C26.82-0.1 26.8-0.42 26.74-0.64C26.05-0.64 25.79-0.96 25.79-2.03L25.79-10.83C25.79-11.23 25.63-11.41 25.44-11.47C25.06-11.2 23.78-10.93 23.3-10.93C23.18-10.75 23.15-10.58 23.15-10.34C24.24-10.34 24.35-9.95 24.35-9.2ZM34.11-1.7C33.14-2.93 32.48-3.73 31.82-4.45L33.22-5.71C34.02-6.45 34.54-6.67 35.17-6.69C35.25-6.88 35.28-7.15 35.28-7.36C34.7-7.33 34.13-7.33 33.78-7.33C33.34-7.33 32.8-7.33 32.11-7.36C32.11-7.12 32.14-6.91 32.21-6.7C32.5-6.7 32.67-6.62 32.67-6.45C32.67-6.22 32.37-5.82 31.65-5.17L30.58-4.19L30.58-10.83C30.58-11.23 30.42-11.41 30.22-11.47C29.84-11.2 28.56-10.93 28.08-10.93C27.97-10.75 27.94-10.58 27.94-10.34C29.02-10.34 29.14-9.95 29.14-9.2L29.14-2.03C29.14-0.96 28.88-0.64 28.03-0.64C27.97-0.43 27.95-0.16 27.95 0.05C28.48 0.02 29.18 0 29.79 0C30.4 0 31.04 0.02 31.6 0.05C31.6-0.1 31.58-0.42 31.52-0.64C30.83-0.64 30.58-0.96 30.58-2.03L30.58-3.73C31.65-2.59 33.14-0.67 33.65 0.14C34.35 0.03 34.93 0 35.7 0C35.76-0.18 35.78-0.38 35.78-0.69C35.04-0.72 34.85-0.78 34.11-1.7ZM40.11-7.47C37.98-7.47 36.5-5.84 36.5-3.66C36.5-1.36 37.92 0.14 40.11 0.14C42.27 0.14 43.73-1.47 43.73-3.66C43.73-5.94 42.38-7.47 40.11-7.47ZM39.95-6.7C41.14-6.7 42.13-5.46 42.13-3.47C42.13-1.79 41.52-0.62 40.24-0.62C38.94-0.62 38.11-1.84 38.11-4C38.11-5.6 38.72-6.7 39.95-6.7ZM49.65-7.33C48.82-7.33 48.18-6.77 47.71-6.03C47.58-5.84 47.5-5.57 47.38-5.2C47.47-5.68 47.58-6.16 47.58-6.77C47.58-7.23 47.42-7.41 47.23-7.47C46.74-7.22 45.74-6.98 45.09-6.93C44.98-6.75 44.94-6.58 44.94-6.34C46-6.3 46.14-5.95 46.14-5.2L46.14-2.03C46.14-0.96 45.89-0.69 45.04-0.64C44.98-0.46 44.96-0.24 44.96 0.05C45.38 0.02 46.32 0 47.07 0C47.82 0 48.59 0.02 49.09 0.05C49.09-0.24 49.07-0.46 49.01-0.64C48-0.69 47.58-0.96 47.58-2.35L47.58-3.89C47.58-5.14 48.38-6.16 48.94-6.16C49.36-6.16 49.68-5.94 49.73-4.91C50.08-4.91 50.45-4.99 50.64-5.06C50.64-5.62 50.67-6.42 50.75-6.94C50.42-7.2 50.08-7.33 49.65-7.33ZM59.97-0.64C59.33-0.64 59.02-0.93 59.02-2.03L59.02-4.78C59.02-6.74 57.95-7.39 56.74-7.39C55.6-7.39 54.77-6.74 54.42-6.24C54.29-6.06 54.24-5.94 54.18-5.82C54.27-6.19 54.29-6.51 54.29-6.77C54.29-7.23 54.13-7.41 53.94-7.47C53.44-7.22 52.45-6.98 51.79-6.93C51.68-6.75 51.65-6.58 51.65-6.34C52.7-6.3 52.85-5.95 52.85-5.2L52.85-2.03C52.85-0.96 52.58-0.64 51.74-0.64C51.68-0.46 51.66-0.24 51.66 0.05C52.13 0.02 52.91 0 53.57 0C54.22 0 55.02 0.03 55.47 0.05C55.47-0.24 55.46-0.45 55.39-0.64C54.56-0.64 54.29-0.96 54.29-2.03L54.29-3.74C54.29-5.7 55.26-6.42 56.1-6.42C56.96-6.42 57.58-5.97 57.58-4.46L57.58-2.03C57.58-0.96 57.25-0.64 56.48-0.64C56.42-0.46 56.4-0.24 56.4 0.05C56.9 0.03 57.65 0 58.3 0C58.96 0 59.58 0.02 60.05 0.05C60.05-0.24 60.03-0.45 59.97-0.64Z'/>", | |
variants: [{ | |
style: "normal", | |
src: "Vollkorn-Regular", | |
weight: 400 | |
}, { | |
style: "normal", | |
src: "Vollkorn-Bold", | |
weight: 700 | |
}, { | |
style: "italic", | |
src: "Vollkorn-Italic", | |
weight: 400 | |
}, { | |
style: "italic", | |
src: "Vollkorn-BoldItalic", | |
weight: 700 | |
}] | |
} | |
}, | |
DEFAULTS: { | |
fontSize: "fs_8", | |
fontFamily: "default", | |
textAlign: "default", | |
lineHeight: "default", | |
backgroundMode: "bgwhite", | |
readingMode: "paged" | |
}, | |
EMBEDDING: { | |
NONE: 1, | |
LIMIT_TOTAL: 2, | |
LIMIT_SINGLE: 3 | |
}, | |
MAX_FILESIZE: 2e6 | |
} | |
}, | |
RESELLER: { | |
1: "tolinode", | |
3: "thaliade", | |
4: "thaliaat", | |
5: "thaliach", | |
6: "buchde", | |
7: "buchch", | |
8: "orellfuesslich", | |
10: "weltbildde", | |
11: "weltbildat", | |
12: "weltbildch", | |
13: "hugendubelde", | |
20: "bertelsmannde", | |
21: "ottode", | |
22: "donaulandat", | |
23: "osianderde", | |
24: "mayerschede", | |
30: "buecherde", | |
40: "bildde", | |
60: "boekhandelbe", | |
61: "clubbe", | |
80: "libride", | |
81: "ebookde", | |
82: "librisnl", | |
90: "ibsit", | |
91: "libraccioit", | |
92: "indiebookit" | |
}, | |
SYSTEM: { | |
MAX_WORKER: 4, | |
FIXED_LOCAL_HEADER_LENGTH: 30 | |
}, | |
THEMES: { | |
DEFAULT_THEME: "tolinode", | |
AVAILABLE: ["tolinode"], | |
RESELLER_DEFAULT_THEME: { | |
1: "tolinode" | |
} | |
}, | |
ENTITLEMENT_TYPES: { | |
AUDIOBOOK: "AUDIOBOOK", | |
EBOOK: "EBOOK", | |
EDATA: "EDATA", | |
EMAGAZINE: "EMAGAZINE", | |
EPAPER: "EPAPER" | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/index.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "c", (function() { | |
return a | |
} | |
)), | |
n.d(t, "g", (function() { | |
return r | |
} | |
)), | |
n.d(t, "k", (function() { | |
return o | |
} | |
)), | |
n.d(t, "l", (function() { | |
return i | |
} | |
)), | |
n.d(t, "r", (function() { | |
return s | |
} | |
)), | |
n.d(t, "t", (function() { | |
return Yt | |
} | |
)), | |
n.d(t, "u", (function() { | |
return Zt | |
} | |
)), | |
n.d(t, "w", (function() { | |
return v | |
} | |
)), | |
n.d(t, "a", (function() { | |
return yn | |
} | |
)), | |
n.d(t, "b", (function() { | |
return Cn | |
} | |
)), | |
n.d(t, "e", (function() { | |
return Vn | |
} | |
)), | |
n.d(t, "d", (function() { | |
return Qn | |
} | |
)), | |
n.d(t, "f", (function() { | |
return Dn | |
} | |
)), | |
n.d(t, "h", (function() { | |
return Xn | |
} | |
)), | |
n.d(t, "i", (function() { | |
return nr | |
} | |
)), | |
n.d(t, "m", (function() { | |
return rr.a | |
} | |
)), | |
n.d(t, "n", (function() { | |
return ir | |
} | |
)), | |
n.d(t, "o", (function() { | |
return ln | |
} | |
)), | |
n.d(t, "p", (function() { | |
return or | |
} | |
)), | |
n.d(t, "q", (function() { | |
return lr | |
} | |
)), | |
n.d(t, "s", (function() { | |
return hr | |
} | |
)), | |
n.d(t, "v", (function() { | |
return mr | |
} | |
)), | |
n.d(t, "j", (function() { | |
return _.a | |
} | |
)); | |
var r = {}; | |
n.r(r), | |
n.d(r, "escapeFileName", (function() { | |
return f | |
} | |
)), | |
n.d(r, "resolveRelativePath", (function() { | |
return h | |
} | |
)), | |
n.d(r, "sanitizeFileName", (function() { | |
return p | |
} | |
)); | |
var i = {}; | |
n.r(i), | |
n.d(i, "getMimeType", (function() { | |
return Qe | |
} | |
)), | |
n.d(i, "getFallbackImage", (function() { | |
return Ye | |
} | |
)), | |
n.d(i, "getNullImage", (function() { | |
return Ze | |
} | |
)), | |
n.d(i, "propagateImageSize", (function() { | |
return $e | |
} | |
)); | |
var o = {}; | |
n.r(o), | |
n.d(o, "jumpToHRef", (function() { | |
return yt | |
} | |
)), | |
n.d(o, "getSupportedMediaSource", (function() { | |
return xt | |
} | |
)), | |
n.d(o, "getMediaURL", (function() { | |
return Ot | |
} | |
)), | |
n.d(o, "getScriptContent", (function() { | |
return Mt | |
} | |
)), | |
n.d(o, "setLangAttribute", (function() { | |
return kt | |
} | |
)), | |
n.d(o, "preprocessLinks", (function() { | |
return At | |
} | |
)), | |
n.d(o, "convertSVGImages", (function() { | |
return Ct | |
} | |
)), | |
n.d(o, "embedImages", (function() { | |
return It | |
} | |
)), | |
n.d(o, "preprocessAudioVideo", (function() { | |
return Rt | |
} | |
)), | |
n.d(o, "processFontStyles", (function() { | |
return Tt | |
} | |
)), | |
n.d(o, "removeFontFamilyStyles", (function() { | |
return Pt | |
} | |
)), | |
n.d(o, "removeTextAlignStyles", (function() { | |
return Lt | |
} | |
)), | |
n.d(o, "removeColorStyles", (function() { | |
return Nt | |
} | |
)), | |
n.d(o, "removeLineHeightStyles", (function() { | |
return Bt | |
} | |
)), | |
n.d(o, "discardStyleProperty", (function() { | |
return Dt | |
} | |
)), | |
n.d(o, "restoreStyleProperty", (function() { | |
return Ut | |
} | |
)), | |
n.d(o, "embedScripts", (function() { | |
return Ft | |
} | |
)); | |
var s = {}; | |
n.r(s), | |
n.d(s, "getTime", (function() { | |
return Vt | |
} | |
)), | |
n.d(s, "setTime", (function() { | |
return Qt | |
} | |
)); | |
var a = n("./musketeer/modules/tolino-shared/services/BaseUtil.js"); | |
n("./node_modules/core-js/modules/es.array.reduce.js"), | |
n("./node_modules/core-js/modules/es.string.replace.js"); | |
const u = { | |
"%21": "!", | |
"%26": "&", | |
"%27": "'", | |
"%28": "(", | |
"%29": ")", | |
"%2B": "+", | |
",": "%2C", | |
":": "%3A", | |
";": "%3B", | |
"=": "%3D", | |
"?": "%3F", | |
"@": "%40" | |
} | |
, l = /%[0-9a-f]{2}/g | |
, c = /[^0-9a-zA-Z]/gi | |
, d = /%[0-9A-Fa-f]{2}|%u[0-9A-Fa-f]{4}/; | |
function f(e) { | |
if (!d.test(e)) | |
try { | |
e = encodeURI(e) | |
} catch (t) { | |
console.warn(t, e) | |
} | |
for (var t in u) | |
e = e.replace(new RegExp("\\" + t,"g"), u[t]); | |
return e | |
} | |
function h(e, t) { | |
if (!e) | |
return ""; | |
"string" != typeof t && (t = ""); | |
var n, r, i, o = t.indexOf("\\") >= 0 ? "\\" : "/", s = t.lastIndexOf(o); | |
s > 0 ? (n = t.substring(0, s), | |
i = t.substring(s + 1), | |
r = n.split(o)) : (r = [], | |
i = ""), | |
e.startsWith("#") && (e = i + e), | |
e.split(o).forEach((function(e) { | |
".." === e ? r.pop() : "." !== e && "~" !== e && r.push(e) | |
} | |
)); | |
var a = r.join(o); | |
return f(a).replace(l, e=>e.toUpperCase()) | |
} | |
function p(e) { | |
return e ? e.replace(c, "-") : "" | |
} | |
var m = n("./node_modules/sha1/sha1.js") | |
, b = n.n(m); | |
const g = { | |
"http://ns.adobe.com/pdf/enc#RC": { | |
numBytes: 1024, | |
getEncryptionKey: function(e) { | |
var t = [] | |
, n = e && e.match(y); | |
if ((e = n && n[2].replace(/[:-]/g, "")) && e.length >= 32) { | |
for (var r = 0; r < 32; r += 2) | |
t.push(parseInt(e.substr(r, 2), 16)); | |
return t | |
} | |
return console.warn("Invalid UUID format: " + e), | |
t | |
} | |
}, | |
"http://www.idpf.org/2008/embedding": { | |
numBytes: 1040, | |
getEncryptionKey: function(e) { | |
e = unescape(encodeURIComponent(e.trim())); | |
for (var t = [], n = b()(e), r = 0, i = 0; i < n.length; r++, | |
i = r >>> 2) | |
t.push(n[i] >>> 24 - 8 * (3 & r) & 255); | |
return t | |
} | |
} | |
} | |
, y = /(urn:uuid:)?([-:0-9a-f]+)/i; | |
var v = n("./musketeer/modules/tolino-shared/services/URLManager.js") | |
, _ = n("./musketeer/modules/tolino-shared/globals.js"); | |
const w = { | |
"font-family": [], | |
"font-style": ["normal", "italic", "oblique"], | |
"font-weight": ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"], | |
"font-stretch": ["normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"] | |
} | |
, S = { | |
Regular: "normal", | |
Reg: "normal", | |
Rg: "normal", | |
Book: "normal", | |
Roman: "normal", | |
Light: "light", | |
Lt: "light", | |
Thin: "thin", | |
Hairline: "thin", | |
Medium: "medium", | |
Med: "medium", | |
Semibold: "semibold", | |
Smbd: "semibold", | |
Demibold: "semibold", | |
Bold: "bold", | |
Bld: "bold", | |
Bd: "bold", | |
Black: "black", | |
Blk: "black", | |
Heavy: "black", | |
Extralight: "extralight", | |
Ultralight: "extralight", | |
Extrabold: "extrabold", | |
Ultrabold: "extrabold", | |
Ultra: "extrabold" | |
} | |
, E = { | |
Italic: "italic", | |
Ital: "italic", | |
It: "italic", | |
Cursive: "italic", | |
Oblique: "oblique", | |
Obl: "oblique" | |
} | |
, j = { | |
thin: 100, | |
extralight: 200, | |
light: 300, | |
normal: 400, | |
medium: 500, | |
semibold: 600, | |
bold: 700, | |
extrabold: 800, | |
black: 900 | |
} | |
, x = /Regular|Book|Roman|Light|Thin|Hairline|Medium|Semibold|Demibold|Bold|Black|Heavy|Extralight|Ultralight|Extrabold|Ultrabold/i | |
, O = /Italic|Oblique|Cursive/i | |
, M = Object.keys(S).join("|") | |
, k = Object.keys(E).join("|") | |
, A = new RegExp("(.+?)[-_ ]?(" + M + ")?[-_ ]?(" + k + ")?$") | |
, C = new RegExp("(.+?)[-_ ](" + M + ")?[-_ ]?(" + k + ")?$","i") | |
, I = /^['"]|['"]$/g | |
, R = /url\(["']?(\S*[^"'])["']?\)/i; | |
function T(e) { | |
return e.type === Object.getPrototypeOf(e).FONT_FACE_RULE | |
} | |
function P(e) { | |
(e.descriptors || []).forEach((function(t) { | |
var n, r = t.property, i = w[r], o = t.values; | |
if (i) { | |
var s = o.length; | |
if (s > 1) { | |
for (var a = 0; a < s && (n = o[a].toLowerCase(), | |
!(i.indexOf(n) >= 0)); a++) | |
; | |
o[0] = n, | |
o.length = 1 | |
} | |
if (i.length > 0 && (/[A-Z]/.test(o[0]) && (o[0] = o[0].toLowerCase()), | |
i.indexOf(o[0]) < 0 && console.warn("Invalid property value '" + t.parsedCssText + "' in rule '" + e.parsedCssText + "'")), | |
"font-family" === r) { | |
var u = t.valueText; | |
if (I.test(u)) { | |
var l = u.indexOf(" ") < 0 ? "" : "'"; | |
o[0] = u.replace(I, l) | |
} | |
} | |
} | |
} | |
)) | |
} | |
function L(e, t) { | |
if (!e || "src" !== e.property) | |
return null; | |
for (var n = e.values || [], r = 0, i = n.length; r < i; r++) { | |
var o = R.exec(n[r]); | |
if (o) { | |
var s = o[1].split(".").pop().toLowerCase(); | |
if (_.a.MIME_TYPES[s]) | |
return h(o[1], t) | |
} | |
} | |
return null | |
} | |
function N(e) { | |
return "src" === e.property | |
} | |
function B(e) { | |
"string" != typeof e && (e = ""); | |
var t = e.split(".").pop().toLowerCase() | |
, n = e.slice(0, -t.length - 1) | |
, r = A.exec(n); | |
r && r[2] || (r = C.exec(n) || []); | |
var i = S[r[2]] || r[2] || "normal" | |
, o = E[r[3]] || r[3] || "normal"; | |
return { | |
family: r[1] || n, | |
weight: i, | |
weightNum: j[i], | |
style: o | |
} | |
} | |
function D(e, t) { | |
var n = t.files || {} | |
, r = t.root || "" | |
, i = t.fontStyleSheet | |
, o = t.ePubInfo.encryption | |
, s = e.cssRules || [] | |
, a = [] | |
, u = 0 | |
, l = s.filter(T); | |
return l.forEach(P, this), | |
l.forEach((function(e) { | |
var s = e.declarations || []; | |
if (function(e, t) { | |
var n, r = t && t.sheet && t.sheet.cssRules || [], i = e.descriptors, o = i.length; | |
function s(e) { | |
return !w[e.property] || e.valueText === n.getPropertyValue(e.property) | |
} | |
for (var a = 0, u = r.length; a < u; a++) | |
if ((n = r[a].style).length === o && i.every(s)) | |
return !0; | |
return !1 | |
}(e, i)) { | |
var l = L(s.filter(N)[0], r) | |
, c = l && n[l]; | |
c && (u += c.getUncompressedSize()) | |
} else | |
s.forEach((function(s) { | |
var l = L(s, r) | |
, c = l && n[l]; | |
if (c) { | |
var d = c.getUncompressedSize(); | |
if (function(e, t, n) { | |
var r = _.a.READER.FONT | |
, i = r.MAX_FILESIZE || 2e6; | |
return n === r.EMBEDDING.NONE || n === r.EMBEDDING.LIMIT_TOTAL && t + e > i || n === r.EMBEDDING.LIMIT_SINGLE && e > i || !1 | |
}(d, u, t.fontEmbeddingLevel)) | |
console.warn('Embedding font "%s": size %s exceeds allowed maximum', l, d); | |
else { | |
var f = l.split(".").pop().toLowerCase() | |
, h = _.a.MIME_TYPES[f]; | |
a.push(c.extract().then((function(n) { | |
var r, a = o && o[l]; | |
a && (r = t.ePubInfo.metadata["dc:identifier"]) && (console.log("embedding obfuscated font face", l, a), | |
function(e, t, n) { | |
var r = g[t]; | |
if (r) | |
for (var i = r.getEncryptionKey(n), o = Math.min(r.numBytes, e.byteLength), s = i.length, a = 0; a < o; a++) | |
e[a] ^= i[a % s] | |
}(n, a, r)), | |
s.values[0] = "url(" + v.createURL(l, n, h) + ")", | |
function(e, t) { | |
if (!t) | |
return !1; | |
try { | |
var n = e.cssText() | |
, r = t.sheet.cssRules ? t.sheet.cssRules.length : 0; | |
return t.sheet.insertRule(n, r), | |
!0 | |
} catch (e) { | |
return console.warn("Error adding publication font: " + e.message), | |
!1 | |
} | |
}(e, i) && (u += d) | |
} | |
))) | |
} | |
} | |
} | |
)) | |
} | |
)), | |
Promise.all(a).then(()=>e) | |
} | |
const U = { | |
UNKNOWN_RULE: 0, | |
STYLE_RULE: 1, | |
CHARSET_RULE: 2, | |
IMPORT_RULE: 3, | |
MEDIA_RULE: 4, | |
FONT_FACE_RULE: 5, | |
PAGE_RULE: 6, | |
KEYFRAMES_RULE: 7, | |
KEYFRAME_RULE: 8, | |
MOZ_KEYFRAMES_RULE: 7, | |
MOZ_KEYFRAME_RULE: 8, | |
WEBKIT_KEYFRAMES_RULE: 7, | |
WEBKIT_KEYFRAME_RULE: 8, | |
NAMESPACE_RULE: 10 | |
} | |
, F = { | |
"@charset": U.CHARSET_RULE, | |
"@import": U.IMPORT_RULE, | |
"@media": U.MEDIA_RULE, | |
"@font-face": U.FONT_FACE_RULE, | |
"@page": U.PAGE_RULE, | |
"@keyframes": U.KEYFRAMES_RULE, | |
"@keyframe": U.KEYFRAME_RULE, | |
"@-moz-keyframes": U.MOZ_KEYFRAMES_RULE, | |
"@-moz-keyframe": U.MOZ_KEYFRAME_RULE, | |
"@-webkit-keyframes": U.WEBKIT_KEYFRAMES_RULE, | |
"@-webkit-keyframe": U.WEBKIT_KEYFRAME_RULE, | |
"@namespace": U.NAMESPACE_RULE | |
} | |
, H = {}; | |
H[U.UNKNOWN_RULE] = "", | |
H[U.STYLE_RULE] = "", | |
H[U.CHARSET_RULE] = "@charset", | |
H[U.IMPORT_RULE] = "@import", | |
H[U.MEDIA_RULE] = "@media", | |
H[U.FONT_FACE_RULE] = "@font-face", | |
H[U.PAGE_RULE] = "@page", | |
H[U.KEYFRAMES_RULE] = "@keyframes", | |
H[U.KEYFRAME_RULE] = "@keyframe", | |
H[U.NAMESPACE_RULE] = "@namespace"; | |
const z = {}; | |
z[U.STYLE_RULE] = !0, | |
z[U.FONT_FACE_RULE] = !0, | |
z[U.PAGE_RULE] = !0, | |
z[U.KEYFRAMES_RULE] = !0, | |
z[U.KEYFRAME_RULE] = !0; | |
const q = {}; | |
q[U.STYLE_RULE] = !0, | |
q[U.MEDIA_RULE] = !0, | |
q[U.FONT_FACE_RULE] = !0, | |
q[U.PAGE_RULE] = !0, | |
q[U.KEYFRAMES_RULE] = !0, | |
q[U.KEYFRAME_RULE] = !0; | |
const W = { | |
",": !0, | |
"=": !0, | |
"!": !0, | |
"/": !0, | |
"(": !0, | |
" ": !0 | |
} | |
, K = { | |
",": !0, | |
"=": !0, | |
"/": !0, | |
"(": !0, | |
")": !0, | |
" ": !0 | |
} | |
, G = { | |
cssRules: !0, | |
declarations: !0, | |
descriptors: !0, | |
mSelectorText: !0, | |
parsedCssText: !0, | |
type: !0 | |
}; | |
function V(e, t) { | |
var n = e.slice(-1) | |
, r = t.charAt(0); | |
return W[n] || K[r] ? e + t : e + " " + t | |
} | |
function Q(e) { | |
return e && e.parsedCssText | |
} | |
function Y(e) { | |
return e && e.cssText() | |
} | |
function Z() {} | |
function $(e, t, n) { | |
this.type = e || U.UNKNOWN_RULE, | |
this.mSelectorText = t || "", | |
this.parsedCssText = n || "", | |
z[e] && (this.descriptors = this.declarations = []) | |
} | |
function X(e, t) { | |
var n = t && t.reduce(V) || ""; | |
this.property = e, | |
this.values = t, | |
this.valueText = n, | |
this.parsedCssText = e + ": " + n | |
} | |
Z.prototype.cssText = function() { | |
return this.descriptors ? this.descriptors.map(Y).join("\n") : "" | |
} | |
, | |
$.prototype.STYLE_RULE = U.STYLE_RULE, | |
$.prototype.IMPORT_RULE = U.IMPORT_RULE, | |
$.prototype.MEDIA_RULE = U.MEDIA_RULE, | |
$.prototype.FONT_FACE_RULE = U.FONT_FACE_RULE, | |
$.prototype.selectorText = function() { | |
return this.mSelectorText | |
} | |
, | |
$.prototype.setSelector = function(e) { | |
this.mSelectorText = e | |
} | |
, | |
$.prototype.cssText = function() { | |
return H[this.type] + (this.mSelectorText ? " " + this.mSelectorText : "") + (q[this.type] ? " { " + (this.descriptors ? this.descriptors.map(Y).join("; ") : "") + " }" : ";") | |
} | |
, | |
$.prototype.replace = function(e) { | |
var t = e.cssRules ? e.cssRules[0] : e; | |
for (var n in t) | |
G[n] && (this[n] = t[n]) | |
} | |
, | |
X.prototype.cssText = function() { | |
return this.property && this.values ? this.property + ": " + this.values.reduce(V) : "" | |
} | |
; | |
class J { | |
constructor() { | |
this.parseTree, | |
this.rule, | |
this.ruleSet, | |
this.ruleSetStack = [], | |
this.Declaration = X | |
} | |
static get ruleType() { | |
return U | |
} | |
_addRule() { | |
this.ruleSet || (this.ruleSet = new Z), | |
this.ruleSet.cssRules || (this.ruleSet.descriptors = this.ruleSet.cssRules = []), | |
this.ruleSet.cssRules.push(this.rule), | |
this.rule = null | |
} | |
startStylesheet() { | |
this.ruleSet = new Z | |
} | |
endStylesheet() { | |
this.parseTree = this.ruleSet, | |
this.ruleSet = null | |
} | |
startRuleSet(e) { | |
this.rule || (this.rule = new $(U.STYLE_RULE,e.join(""))) | |
} | |
endRuleSet() { | |
var e = this.rule.declarations.map(Q).join("; "); | |
this.rule.parsedCssText += this.rule.mSelectorText + " { " + e + " }", | |
this._addRule() | |
} | |
startAtRule(e, t) { | |
var n = t.join(""); | |
this.rule = new $(F[e],n,e + " ") | |
} | |
endAtRule() { | |
if (this.rule) { | |
this.rule.parsedCssText += this.rule.mSelectorText; | |
var e = this.rule.cssRules && this.rule.cssRules.map(Q).join("\n"); | |
e && (this.rule.parsedCssText += " { " + e + " }"), | |
this._addRule() | |
} | |
} | |
startBlock() { | |
this.ruleSetStack.push(this.ruleSet), | |
this.ruleSet = this.rule, | |
this.rule = null | |
} | |
endBlock() { | |
this.rule = this.ruleSet, | |
this.ruleSet = this.ruleSetStack.pop() | |
} | |
declaration(e, t) { | |
this.rule.declarations || (this.rule.descriptors = this.rule.declarations = []), | |
this.rule.declarations.push(new X(e,t)) | |
} | |
getParseTree() { | |
return this.parseTree | |
} | |
getRule() { | |
return this.rule | |
} | |
reset() { | |
this.parseTree = null, | |
this.rule = null, | |
this.ruleSet = null, | |
this.ruleSetStack.length = 0 | |
} | |
} | |
const ee = "[\\t\\n\\f ]" | |
, te = ee + "*" | |
, ne = "(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])" | |
, re = "\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'" | |
, ie = new RegExp(["\\uFEFF", "U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?", "url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]", "(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]", "(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*", re, "[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?", "\x3c!--", "--\x3e", "[\\t\\n\\f ]+", "/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)", "[~|^$*]=", "[^\"'\\\\/]|/(?![/*])"].join("|"),"gi") | |
, oe = "'".charCodeAt(0) | |
, se = '"'.charCodeAt(0) | |
, ae = "/".charCodeAt(0) | |
, ue = " ".charCodeAt(0) | |
, le = new RegExp("^url\\(" + te + "[\"']?|[\"']?" + te + "\\)$","gi") | |
, ce = /[\u0000-\u001f\\"<>]/g | |
, de = { | |
"\\": "\\\\" | |
} | |
, fe = { | |
"\\": "%5c" | |
}; | |
function he(e) { | |
var t = parseInt(e.substring(1), 16); | |
return t > 65535 ? (t -= 65536, | |
String.fromCharCode(55296 + (t >> 10), 56320 + (1023 & t))) : isNaN(t) ? e[1] < " " ? "" : e[1] : String.fromCharCode(t) | |
} | |
function pe(e, t) { | |
return '"' + e.replace(ce, t) + '"' | |
} | |
function me(e) { | |
return de[e] || (de[e] = "\\\\" + e.charCodeAt(0).toString(16) + " ") | |
} | |
function be(e) { | |
return fe[e] || (fe[e] = (e < "" ? "%0" : "%") + e.charCodeAt(0).toString(16)) | |
} | |
function ge(e, t) { | |
return e === ae && t > 1 | |
} | |
function ye(e, t) { | |
return e <= ue || "\\" === t || "--\x3e" === t || "\x3c!--" === t || "\ufeff" === t | |
} | |
function ve(e) { | |
return function(e) { | |
for (var t, n = 0, r = " ", i = 0, o = e.length; i < o; i++) { | |
var s = e[i].replace(new RegExp("\\\\(?:" + ne + "|[\\n\\f])","g"), he) | |
, a = s.length | |
, u = s.charCodeAt(0); | |
ye(u, s) || ge(u, a) ? s = " " : (t = u) === se || t === oe ? s = pe(s.substring(1, a - 1), me) : /url\(/i.test(s) && (s = "url(" + pe(s.replace(le, ""), be) + ")"), | |
s === r && " " === s || (e[n++] = r = s) | |
} | |
return e.length = n, | |
e | |
}((e = e && e.replace(/\r\n?/g, "\n") || "").match(ie) || []) | |
} | |
const _e = /^-?[a-z]/i | |
, we = { | |
"{": !0, | |
"}": !0, | |
";": !0, | |
"@": !0 | |
}; | |
function Se(e, t, n, r) { | |
for (var i, o, s, a = [], u = -1; t < n; t++) | |
if ("[" === (i = e[t].charAt(0)) || "(" === i) | |
a[++u] = i; | |
else if (o = a[u], | |
s = i, | |
"[" === o && "]" === s || "(" === o && ")" === s) | |
u--; | |
else if (we[i] || ":" === i && !r) | |
break; | |
return u >= 0 && (t = ~(t + 1)), | |
t | |
} | |
function Ee(e, t, n, r) { | |
var i, o = t[n++]; | |
if (!_e.test(o)) | |
return n + 1; | |
if (n < r && " " === t[n] && n++, | |
n === r || ":" !== t[n]) { | |
for (; n < r && ";" !== (i = t[n]) && "}" !== i; ) | |
n++; | |
return n | |
} | |
++n < r && " " === t[n] && n++; | |
var s = n | |
, a = Se(t, n, r); | |
if (a < 0) | |
a = ~a; | |
else { | |
for (var u = [], l = 0, c = s; c < a; c++) | |
" " !== (i = t[c]) && (u[l++] = i); | |
if (a < r) { | |
do { | |
if (";" === (i = t[a]) || "}" === i) | |
break; | |
l = 0 | |
} while (++a < r);";" === i && a++ | |
} | |
l > 0 && e.declaration(o.toLowerCase(), u) | |
} | |
return a | |
} | |
function je(e, t, n, r) { | |
var i = n | |
, o = Se(t, n, r, !0); | |
if (o < 0) | |
return n === (o = ~o) ? o + 1 : o; | |
n = o, | |
o > i && " " === t[o - 1] && o--; | |
var s = t[n]; | |
if (n++, | |
"{" !== s) | |
return n; | |
for (e.startRuleSet(t.slice(i, o)); n < r && "}" !== (s = t[n]); ) | |
n = " " === s ? n + 1 : Ee(e, t, n, r); | |
return e.endRuleSet(), | |
n < r ? n + 1 : n | |
} | |
function xe(e, t, n, r, i) { | |
for (var o = n++; n < r && "{" !== t[n] && ";" !== t[n]; ) | |
n++; | |
if (n < r && (i || ";" === t[n])) { | |
var s = o + 1 | |
, a = n; | |
s < r && " " === t[s] && s++, | |
a > s && " " === t[a - 1] && a--; | |
var u = t[o].toLowerCase(); | |
e.startAtRule(u, t.slice(s, a)), | |
n = "@page" === u || "@font-face" === u ? je(e, t, n, r) : "{" === t[n] ? function e(t, n, r, i) { | |
r++, | |
t.startBlock(); | |
for (; r < i; ) { | |
var o = n[r].charAt(0); | |
if ("}" === o) { | |
r++; | |
break | |
} | |
" " === o || ";" === o ? r++ : r = "@" === o ? xe(t, n, r, i, !1) : "{" === o ? e(t, n, r, i) : je(t, n, r, i) | |
} | |
return t.endBlock(), | |
r | |
}(e, t, n, r) : n + 1, | |
e.endAtRule() | |
} | |
return n | |
} | |
function Oe(e, t, n, r) { | |
return n < r ? "@" === t[n].charAt(0) ? xe(e, t, n, r, !0) : je(e, t, n, r) : n | |
} | |
class Me { | |
constructor() { | |
this.astBuilder = new J | |
} | |
parseDeclarations(e, t) { | |
t && this.astBuilder.reset(), | |
this.astBuilder.startRuleSet([]); | |
for (var n = ve(e), r = 0, i = n.length; r < i; ) | |
r = " " !== n[r] ? Ee(this.astBuilder, n, r, i) : r + 1; | |
return this.astBuilder.getRule() | |
} | |
parse(e) { | |
return function(e, t) { | |
var n = ve(t); | |
e.startStylesheet(); | |
for (var r = 0, i = n.length; r < i; ) | |
r = " " === n[r] ? r + 1 : Oe(e, n, r, i); | |
e.endStylesheet() | |
}(this.astBuilder, e), | |
this.astBuilder.getParseTree() | |
} | |
} | |
const ke = /([^a-z0-9_\-.#]|^)body(?![a-z0-9_\-])/i | |
, Ae = /url\(["']?(.+\.(png|jpg|jpeg|gif|svg)[\1]?)/i | |
, Ce = /px$|pt$|cm$|mm$|in$|pc$/i | |
, Ie = { | |
font: 16, | |
"font-size": 16, | |
"line-height": 18 | |
} | |
, Re = { | |
normal: "100%", | |
"xx-small": "56.25%", | |
"x-small": "62.5%", | |
small: "81.25%", | |
medium: "100%", | |
large: "112.5%", | |
"x-large": "150%", | |
"xx-large": "200%", | |
smaller: "83.33%", | |
larger: "120%" | |
} | |
, Te = { | |
"font-style": /^(normal|italic|oblique)$/i, | |
"font-variant": /^(normal|small-caps)$/i, | |
"font-weight": /^(normal|bold|bolder|lighter|\d00)$/i, | |
"font-stretch": /^(normal|condensed|expanded|ultra-condensed|extra-condensed|semi-condensed|semi-expanded|extra-expanded|ultra-expanded)$/i | |
} | |
, Pe = { | |
pt: 16 / 12, | |
cm: 37.8, | |
mm: 3.78, | |
in: 96, | |
pc: 16 | |
} | |
, Le = /^(margin(-left|-right|-top|-bottom)?|padding(-left|-right)?|(min|max)(-width|-height))$/; | |
function Ne(e) { | |
return e[0] && Object.getPrototypeOf(e[0]) | |
} | |
function Be(e, t, n) { | |
var r, i, o, s = (new J).Declaration, a = e.length - 1; | |
function u(e, r) { | |
var i = new s(e,r instanceof Array ? r : [r]); | |
n.splice(t++, 0, i) | |
} | |
for (i = a; i >= 0 && (r = e[i], | |
isNaN(parseFloat(r)) && !Re[r.toLowerCase()]); i--) | |
; | |
o = i < a ? e.slice(i + 1) : ["inherit"], | |
n.splice(t++, 1, new s("font-family",o)), | |
i > 1 && "/" === e[i - 1] ? (u("font-size", e[i - 2]), | |
u("line-height", e[i]), | |
i -= 3) : (u("font-size", e[i] || "100%"), | |
i--); | |
for (var l, c = Object.keys(Te), d = 0; d <= i; d++) | |
for (r = e[d]; l = c.shift(); ) | |
if (Te[l].test(r)) { | |
u(l, r); | |
break | |
} | |
} | |
function De(e, t) { | |
var n = e.cssRules || [] | |
, r = Ne(n); | |
return n.forEach((function(e) { | |
if (e.type === r.STYLE_RULE) | |
for (var n = e.declarations || [], i = n.length - 1; i >= 0; i--) | |
n[i].property === t && n.splice(i, 1) | |
} | |
)), | |
Promise.resolve(e) | |
} | |
function Ue(e) { | |
var t = e.cssRules || [] | |
, n = Ne(t); | |
return t.forEach((function(e) { | |
e.type === n.STYLE_RULE ? (e.declarations || []).forEach((function(e) { | |
var t = Ie[e.property]; | |
if (t) { | |
var n, r = e.values || []; | |
r.forEach((function(e, i) { | |
var o, s, a, u; | |
null !== (o = e.match(Ce)) ? r[i] = (s = parseFloat(e, 10), | |
a = t, | |
u = o[0], | |
s * (Pe[u.toLowerCase()] || 1) / a * 100 + "%") : (n = Re[e.toLowerCase()]) && (r[i] = n) | |
} | |
)) | |
} | |
} | |
)) : e.type === n.MEDIA_RULE && Ue(e) | |
} | |
)), | |
Promise.resolve(e) | |
} | |
function Fe(e) { | |
for (var t = e.cssRules || [], n = Ne(t), r = t.length - 1; r >= 0; r--) { | |
var i = t[r]; | |
i && i.type === n.FONT_FACE_RULE && t.splice(r, 1) | |
} | |
return Promise.resolve(e) | |
} | |
function He(e) { | |
return De(e, "text-align") | |
} | |
function ze(e) { | |
return De(e, "color") | |
} | |
function qe(e) { | |
return De(e, "line-height") | |
} | |
function We(e) { | |
var t = e.cssRules || [] | |
, n = Ne(t); | |
return t.forEach((function(e) { | |
if (e.type === n.STYLE_RULE) { | |
if (ke.test(e.selectorText())) | |
for (var t = e.declarations || [], r = t.length - 1; r >= 0; r--) | |
Le.test(t[r].property) && t.splice(r, 1) | |
} else | |
e.type === n.MEDIA_RULE && We(e) | |
} | |
)), | |
Promise.resolve(e) | |
} | |
function Ke(e, t) { | |
var n = t && t.files || {} | |
, r = t && t.root || "" | |
, i = t && t.deliverableId || "" | |
, o = e.cssRules || [] | |
, s = []; | |
return o.forEach((function(e) { | |
(e.declarations || []).forEach((function(e) { | |
var t = e.values || []; | |
t.forEach((function(e, o) { | |
var a = e.match(Ae); | |
if (a) { | |
var u = a[1] | |
, l = a[2] | |
, c = _.a.MIME_TYPES[l.toLowerCase()]; | |
u = h(u, r); | |
var d = n[u]; | |
d ? s.push(d.extract().then((function(e) { | |
t[o] = "url(" + v.createURL(i + u, e, c) + ")" | |
} | |
))) : (console.log('CSS.embedImages: File "' + u + '" not found'), | |
t[o] = "url(" + _.a.MEDIA.IMAGE_PLACEHOLDER + ")") | |
} | |
} | |
)) | |
} | |
)) | |
} | |
)), | |
Promise.all(s).then(()=>e) | |
} | |
function Ge(e, t) { | |
var n, r = t && t.files || {}, i = t && t.root || "", o = e.cssRules || [], s = Ne(o), a = []; | |
return o.forEach((function(e, t) { | |
if (e.type === s.IMPORT_RULE) { | |
var o = e.selectorText().match(/(url\()?['"]?([^'"\)]+)/) | |
, u = o && h(o[2], i) | |
, l = r[u]; | |
l ? (n || (n = new Me), | |
a.push(l.extract().then((function() { | |
return { | |
position: t, | |
cssRules: n.parse(l.getFileContentAsString()).cssRules || [] | |
} | |
} | |
)))) : console.warn('CSS.embedImportRules: File "' + u + '" not found') | |
} | |
} | |
)), | |
Promise.all(a).then((function(t) { | |
for (var n; n = t.pop(); ) | |
Array.prototype.splice.apply(e.cssRules, [n.position, 1].concat(n.cssRules)); | |
return e | |
} | |
)) | |
} | |
function Ve(e) { | |
return (e.cssRules || []).forEach((function(e) { | |
for (var t = e.declarations || [], n = t.length - 1; n >= 0; n--) | |
"font" === t[n].property && Be(t[n].values, n, t) | |
} | |
)), | |
Promise.resolve(e) | |
} | |
function Qe(e) { | |
if (!e) | |
return null; | |
var t = e.split("?")[0].split(".").pop().toLowerCase(); | |
return _.a.MIME_TYPES[t] || _.a.MIME_TYPES.png | |
} | |
function Ye(e) { | |
var t = /(^audio|video_unsupported|video)/i.exec(e) | |
, n = "IMAGE_DEFAULT_" + (t ? t[1].toUpperCase() : "PUB"); | |
return _.a.MEDIA[n] | |
} | |
function Ze() { | |
return _.a.MEDIA.IMAGE_NULL | |
} | |
function $e(e, t, n) { | |
if (e && (t || n)) | |
if ("svg" !== e.nodeName) { | |
var r = e.getAttribute("data-width") || e.naturalWidth || 1 | |
, i = e.getAttribute("data-height") || e.naturalHeight || 1 | |
, o = e.style | |
, s = a.getMatchedCSSRules(e); | |
if (a.getCascadedStyle("width", s)) { | |
i / r > n / t ? (o.setProperty("width", "auto"), | |
i > n && o.setProperty("height", n + "px")) : o.setProperty("height", "auto") | |
} else { | |
var u = a.getCascadedStyle("height", s); | |
if (u && "auto" !== u && (!u.endsWith("%") || parseFloat(u, 10) <= 95)) | |
o.setProperty("width", "auto"); | |
else { | |
var l = i > r ? 1.333 : 1; | |
t = t || 1 / 0, | |
n = n || 1 / 0; | |
var c = Math.min(t / r, n / i, l); | |
o.setProperty("width", Math.round(c * r) + "px"), | |
o.setProperty("height", "auto") | |
} | |
} | |
} else | |
!function(e, t, n) { | |
const r = e.querySelector("image"); | |
r && (r.setAttribute("width", "100%"), | |
r.setAttribute("height", "100%"), | |
e.setAttribute("width", "100%"), | |
e.hasAttribute("viewBox") && e.setAttribute("preserveAspectRatio", "xMidYMid meet")) | |
}(e) | |
} | |
var Xe = n("./node_modules/postal/lib/postal.js") | |
, Je = n.n(Xe); | |
const et = e=>e | |
, tt = Je.a.channel("reader") | |
, nt = /https?:\/\/|mailto:/i | |
, rt = /^([\[\{])?([\d\.]+|[\*†‡§]+)([\]\}])?\s*(.*)$/ | |
, it = /(Seite|Page|Página|Pagina)\s*$/i | |
, ot = /(Seite|Page|Página|Pagina)\s*\d+/i | |
, st = /data:([^;,]*?)(;charset\=[^;,]+)?(;base64)?,(.*)$/ | |
, at = /(font\s*:[^;$]+;?)/gi | |
, ut = /\b(window.location(.href|\b)|location.href)\s*=\s*([^;$]*)/g | |
, lt = /\$\(location\).attr\(\s*["']href["']\s*,\s*([^)]*)\)/g; | |
function ct(e, t, n) { | |
e.getAttribute("xlink:href") && (function e(t) { | |
return "svg" !== t.nodeName.toLowerCase() && t.parentNode ? e(t.parentNode) : t | |
}(e).removeAttribute("viewBox"), | |
e.setAttribute("width", t + "px"), | |
e.setAttribute("height", n + "px")), | |
e.style.width = t + "px !important", | |
e.style.height = n + "px !important" | |
} | |
function dt(e, t, n) { | |
var r = h(e, n); | |
if (!r || !t) | |
return null; | |
if (r in t) | |
return r; | |
for (var i in t) | |
if (i.endsWith(r)) | |
return i; | |
return null | |
} | |
function ft(e) { | |
var t, n, r = (new Me).parseDeclarations(e), i = r && r.declarations[0].values; | |
function o(e, t, r) { | |
e.test(r) && (n += " " + t + ": " + r + ";") | |
} | |
for (var s = i.length - 1; s >= 0 && (t = i[s], | |
isNaN(parseFloat(t)) && !/^(xx-small|x-small|small|medium|large|x-large|xx-large|smaller|larger)$/i.test(t)); s--) | |
; | |
for (n = "font-family: " + i.slice(s + 1).join(", ") + ";", | |
s > 1 && "/" === i[s - 1] ? (n += " font-size: " + i[s - 2] + "; line-height: " + i[s] + ";", | |
s -= 3) : (n += " font-size: " + (i[s] || "100%") + ";", | |
s--); s >= 0; s--) | |
o(/^(bold|bolder|lighter|\d00)$/i, "font-weight", t = i[s]), | |
o(/^(normal|small-caps)$/i, "font-variant", t), | |
o(/^(italic|oblique)$/i, "font-style", t), | |
o(/(condensed|expanded)$/i, "font-stretch", t); | |
return n | |
} | |
function ht(e) { | |
Array.prototype.forEach.call(e, (function(e) { | |
e.removeAttribute("src") | |
} | |
)) | |
} | |
function pt(e, t) { | |
var n, r, i; | |
"VIDEO" === this.nodeName && (e || (t ? (e = Ye("video"), | |
n = et("VIDEO_START"), | |
r = "vc" + Math.random().toString().substring(10), | |
this.setAttribute("data-caption-id", r)) : (e = Ye("video_unsupported"), | |
n = et("VIDEO_UNSUPPORTED")), | |
i = function(e, t, n, r) { | |
var i = r.createElement("div"); | |
return i.appendChild(r.createTextNode(e)), | |
i.setAttribute("class", n), | |
t && i.setAttribute("id", t), | |
i | |
}(n, r, "media-caption", this.ownerDocument), | |
this.parentNode.insertBefore(i, this.nextSibling)), | |
this.setAttribute("poster", e)) | |
} | |
function mt(e) { | |
var t = this.getAttribute("data-caption-id") | |
, n = t && this.ownerDocument.getElementById(t); | |
n && Object(a.setClass)(n, "hidden", "play" === e.type) | |
} | |
function bt(e) { | |
return e && ("noteref" === e.getAttribute("epub:type") || rt.test(e.textContent) && !function e(t) { | |
for (var n = t && t.previousSibling; n; ) { | |
if (n.textContent.trim()) | |
return !1; | |
n = n.previousSibling | |
} | |
var r = t && t.parentNode; | |
return r && (!Object(a.isInlineElement)(r) || e(r)) | |
}(e) && !function(e) { | |
var t = e.previousSibling && e.previousSibling.textContent || e.previousElementSibling && e.previousElementSibling.textContent; | |
return ot.test(e) || it.test(t) | |
}(e)) | |
} | |
function gt(e, t) { | |
return (nt.test(e) ? "external" : bt(t) && "noteref") || e && "internal" || "" | |
} | |
function yt(e, t, n) { | |
if (t || (t = /https?:\/\//i.test(e) ? "external" : e ? "internal" : ""), | |
"external" === t) | |
tt.publish("rx.navigate.url", e); | |
else { | |
n && (e = h(e, n)); | |
var r = e.split("#"); | |
tt.publish("rx.navigate.toc", { | |
src: r[0], | |
srcAnchor: r[1] | |
}) | |
} | |
} | |
function vt() { | |
var e = this.getAttribute("data-href"); | |
yt(e, gt(e, this)) | |
} | |
function _t(e, t, n) { | |
e.setAttribute("class", "rx-link-" + n), | |
e.setAttribute("data-href", t), | |
e.removeAttribute("href"), | |
e.addEventListener("click", vt) | |
} | |
function wt(e, t, n) { | |
var r, i = h(e.getAttribute("href"), t); | |
if (!e.hasAttribute("rx-back-ref") && (r = function(e) { | |
if (e) { | |
for (var t, n = e.textContent; e && (!n || (t = n.match(rt))); ) { | |
if (t && "dt" === e.nodeName.toLowerCase()) | |
return e.nextElementSibling.textContent; | |
if (n = t && t[4] && t[4].trim()) | |
break; | |
n = (e = e.parentNode) && e.textContent && e.textContent.trim() || "" | |
} | |
return n | |
} | |
}(n))) { | |
var o = e.textContent.match(rt); | |
o && !o[1] && e.classList.add("rx-note-ref-bracket"), | |
e.setAttribute("data-href", i), | |
e.removeAttribute("href"), | |
e.setAttribute("rx-note-ref", r), | |
e.parentNode.style.verticalAlign = "initial", | |
e.addEventListener("click", t=>{ | |
t.stopPropagation(), | |
tt.publish("rx.noteref.click", { | |
anchor: e, | |
target: t.target | |
}) | |
} | |
); | |
var s = function(e, t, n) { | |
if (e) { | |
var r = "a" === e.nodeName.toLowerCase() && e || e.querySelector("a") || e.parentNode.querySelector("a"); | |
if (r) { | |
var i = r.getAttribute("href") || r.getAttribute("data-href") | |
, o = i && i.split("#") || [] | |
, s = o[0] && h(o[0], n); | |
if (o[1] === t && (!s || s === n)) | |
return r | |
} | |
} | |
}(n, e.id, t); | |
s && s.setAttribute("rx-back-ref", "") | |
} else | |
_t(e, i, "internal") | |
} | |
function St(e, t, n) { | |
var r = new RegExp("(^|;|\\s)" + t + "\\s*:[^;$]+[;$]","ig") | |
, i = e && e.querySelectorAll("[style]") || []; | |
Array.prototype.forEach.call(i, (function(e) { | |
var i = e.getAttribute("style"); | |
if (r.test(i)) { | |
if (n) { | |
var o = i.match(r); | |
n(e, t, o && o[0]) | |
} | |
(i = i.replace(r, "$1")) ? e.setAttribute("style", i) : e.removeAttribute("style") | |
} | |
} | |
)) | |
} | |
function Et(e, t, n) { | |
if (e && n) { | |
var r = e._discardedStyle; | |
r || (r = e._discardedStyle = []); | |
var i = r.findIndex(e=>e.startsWith(t)); | |
i >= 0 ? r[i] = n : (r.push(n), | |
e.setAttribute("_discardedStyle", "")) | |
} | |
} | |
function jt(e, t, n) { | |
return e = e.replace(/\bconst\b/g, "var"), | |
(ut.test(e) || lt.test(e)) && (e = (e = e.replace(ut, 'jumpToHRef($3,null,"' + t + '")')).replace(lt, 'jumpToHRef($1,null,"' + t + '")'), | |
e += '\nif (typeof jumpToHRef !== "function") { var jumpToHRef = ' + yt.toString() + " }\n"), | |
"scripts/tigerbooks.model.js" === n ? e = (e = e.replace(/\$sceneRootDiv = getSceneRootDiv\(\);/, "$sceneRootDiv = $(document.querySelector('body > div'));")).replace(/if \(typeof animation.sound \!\=\= \'undefined\' \&\& animation\.sound \!\=\= \'\'\) \{(.|\n)+?var soundId \= animation\.sound\;/, "if (animation.sound) {\nvar soundId = typeof animation.sound === 'object' ? animation.sound.id : animation.sound;") : "scripts/engine.js" === n && (e = e.replace(/(function urlForSoundWithID\(id\) \{)/, "$1\nif (typeof id === 'object') { id = id.id; }")), | |
console.info('Loading Script "' + n + '",', e.length, "Bytes"), | |
e | |
} | |
function xt(e) { | |
var t = Array.prototype.slice.call(e.querySelectorAll("source")); | |
function n(t) { | |
return t && "function" == typeof e.canPlayType && e.canPlayType(t) | |
} | |
for (var r = 0, i = t.length; r < i; r++) { | |
var o = t[r]; | |
if (n(o.getAttribute("type"))) | |
return t.splice(r, 1), | |
ht(t), | |
o | |
} | |
ht(t); | |
var s = e.getAttribute("data-src") || e.getAttribute("src"); | |
if (s) { | |
var a = s.split(".").pop().toLowerCase() | |
, u = _.a.MIME_TYPES[a]; | |
return "IMG" === e.nodeName && /^image/.test(u) || n(u) ? e : null | |
} | |
} | |
function Ot(e, t, n) { | |
if (/^data:/.test(e)) | |
return Promise.resolve(e); | |
var r = dt(e, t.files, t.root) | |
, i = t && t.deliverableId || "" | |
, o = r && r.split(".").pop().toLowerCase() | |
, s = _.a.MIME_TYPES[o] | |
, a = t.files[r]; | |
return a ? a.extract().then(e=>Object(v.fetchURL)(i + r, e, s).then((function(e) { | |
return e || (console.warn('fetchURL failed: loading "' + r + '" as data URL'), | |
e = "data:" + s + ";base64," + a.getFileContentAsBase64()), | |
a.releaseContent(), | |
e | |
} | |
))) : (console.warn('HTML.getMediaURL: File "' + r + '" not found for src "' + e + '"'), | |
n && ct(n, 150, 100), | |
Promise.resolve(null)) | |
} | |
function Mt(e, t) { | |
var n, r = dt(e, t.files, t.root), i = t.files[r]; | |
if (/soundmanager[^\/]*\.js$/i.test(e)) | |
return Promise.resolve(""); | |
if (i) | |
return i.extract().then(()=>jt(i.getFileContentAsString(), t.root, e)); | |
if ((n = e.match(st)) && /\/(x-)?javascript$/.test(n[1])) { | |
var o = n[3] ? t.window.atob(n[4]) : decodeURIComponent(n[4]); | |
return Promise.resolve(jt(o, t.root, "script")) | |
} | |
return console.warn('HTML.getScriptContent: File "' + r + '" not found'), | |
Promise.resolve("") | |
} | |
function kt(e, t) { | |
var n = e.documentElement; | |
return n && t.language && (n.hasAttribute("lang") || n.setAttribute("lang", t.language), | |
n.hasAttribute("xmlns") && !n.hasAttribute("xml:lang") && n.setAttribute("xml:lang", t.language)), | |
Promise.resolve(e) | |
} | |
function At(e, t) { | |
var n = t && t.root || "" | |
, r = e.querySelectorAll("a") | |
, i = []; | |
return Array.prototype.forEach.call(r, (function(r) { | |
var o = r.getAttribute("href") | |
, s = gt(o, r); | |
if ("noteref" === s) | |
return i.push(function(e, t, n) { | |
if (!n) | |
return Promise.resolve(null); | |
if (n.startsWith("#")) | |
return Promise.resolve(e.getElementById(n.substr(1))); | |
var r = n.split("#") | |
, i = h(r[0], t.root) | |
, o = t.files[i]; | |
return o ? o.extract().then((function() { | |
var e = o.getFileContentAsDOM(); | |
return e && e.getElementById(r[1]) | |
} | |
)) : Promise.resolve(null) | |
}(e, t, o).then(wt.bind(this, r, t.root))); | |
"internal" === s ? _t(r, o = h(o, n), s) : "external" === s && (r.setAttribute("title", o), | |
_t(r, o, s)) | |
} | |
)), | |
Promise.all(i).then(()=>e) | |
} | |
function Ct(e) { | |
var t = e.querySelectorAll("svg"); | |
return Array.prototype.forEach.call(t, (function(t) { | |
var n = t.querySelector("image"); | |
if (n) { | |
var r = e.createElement("img"); | |
r.setAttribute("src", n.getAttribute("xlink:href")), | |
t.parentNode.replaceChild(r, t) | |
} | |
} | |
)), | |
Promise.resolve(e) | |
} | |
function It(e, t) { | |
var n = [] | |
, r = e.querySelectorAll("img, image"); | |
return Array.prototype.forEach.call(r, (function(e) { | |
var r = e.getAttribute("xlink:href") | |
, i = e.getAttribute("data-src") | |
, o = r || i || e.getAttribute("src"); | |
i || e.setAttribute("data-src", o), | |
t.hasFixedLayout || (e.removeAttribute("height"), | |
e.removeAttribute("width")), | |
n.push(Ot(o, t, e).then((function(t) { | |
var n = r ? "xlink:href" : "src"; | |
e.setAttribute(n, t || _.a.MEDIA.IMAGE_PLACEHOLDER) | |
} | |
))) | |
} | |
)), | |
Promise.all(n).then(()=>e) | |
} | |
function Rt(e, t) { | |
var n = [] | |
, r = e.querySelectorAll("audio, video") | |
, i = Object(a.getPlatform)(t.window.navigator) | |
, o = "android" !== i.OS || i.Version >= 5; | |
return Array.prototype.forEach.call(r, (function(e) { | |
if (!o) | |
return console.warn("No support for playback from object URL - removing node", e), | |
void e.parentNode.removeChild(e); | |
var r = xt(e) | |
, i = r && r.getAttribute("src"); | |
if (i) { | |
function s(n) { | |
e.removeEventListener("error", s, !1), | |
e.removeEventListener("load", s, !1), | |
n && ("error" === n.type || /error/i.test(n.name)) && Ot(i, t).then((function(t) { | |
e.setAttribute("src", t), | |
e[n.type ? "load" : "play"].call(e) | |
} | |
)) | |
} | |
e.setAttribute("data-src", i), | |
e.addEventListener("error", s, !1), | |
e.addEventListener("load", s, !1); | |
var a = e.getAttribute("poster"); | |
a ? n.push(Ot(a, t).then(pt.bind(e))) : pt.call(e, null, !0), | |
e.addEventListener("click", (function(e) { | |
if (this.paused) { | |
var t = this.play(); | |
t && "function" == typeof t.then && t.then(s, s) | |
} else | |
this.pause(); | |
e.preventDefault() | |
} | |
), !1), | |
e.addEventListener("play", mt, !1), | |
e.addEventListener("pause", mt, !1), | |
"ibooks:soundtrack" === e.getAttribute("epub:type") && (e.setAttribute("autoplay", ""), | |
e.setAttribute("loop", "")), | |
e.innerHTML = "" | |
} else | |
pt.call(e, null, !1), | |
e.removeAttribute("controls"); | |
var u = e.getAttribute("width") | |
, l = e.getAttribute("height"); | |
u && l && (e.style ? (e.style.width = u + "px", | |
e.style.height = l + "px") : e.setAttribute("style", "width: " + u + "px; height: " + l + "px;")) | |
} | |
)), | |
Promise.all(n).then((function() { | |
return function(e) { | |
if (e.querySelector("audio[autoplay]")) { | |
var t = e.querySelector("head") || e | |
, n = e.createElement("script"); | |
n.setAttribute("type", "text/javascript"), | |
n.appendChild(e.createTextNode('window.addEventListener("DOMContentLoaded", function() { [].forEach.call(document.querySelectorAll("audio[autoplay]"), function(a) { setTimeout(function() { a.play(); }, 1000); }); }, false);')), | |
t.appendChild(n) | |
} | |
}(e), | |
e | |
} | |
)) | |
} | |
function Tt(e) { | |
var t = e.querySelectorAll("[style]"); | |
return Array.prototype.forEach.call(t, (function(e) { | |
var t = e.getAttribute("style"); | |
t.match(at) && (t = t.replace(at, ft), | |
e.setAttribute("style", t)) | |
} | |
)), | |
Promise.resolve(e) | |
} | |
function Pt(e) { | |
return St(e, "font-family"), | |
Promise.resolve(e) | |
} | |
function Lt(e) { | |
return St(e, "text-align"), | |
Promise.resolve(e) | |
} | |
function Nt(e) { | |
return St(e, "color"), | |
Promise.resolve(e) | |
} | |
function Bt(e) { | |
return St(e, "line-height"), | |
Promise.resolve(e) | |
} | |
function Dt(e, t) { | |
St(e, t, Et) | |
} | |
function Ut(e, t) { | |
var n = new RegExp("^" + t + "\\s*:\\s*([^;$!]+)[;$!](important)?") | |
, r = e.querySelectorAll("[_discardedStyle]"); | |
Array.prototype.forEach.call(r, (function(e) { | |
for (var r, i = e._discardedStyle || [], o = i.length - 1; o >= 0; o--) | |
(r = n.exec(i[o])) && (e.style.setProperty(t, r[1], r[2]), | |
i.splice(o, 1)); | |
0 === i.length && e.removeAttribute("_discardedStyle") | |
} | |
)) | |
} | |
function Ft(e, t) { | |
var n = [] | |
, r = e.querySelectorAll("script[src]"); | |
return Array.prototype.forEach.call(r, (function(r) { | |
var i = r.getAttribute("src"); | |
r.removeAttribute("src"), | |
r.setAttribute("data-src", i), | |
i && n.push(Mt(i, t).then(t=>t && r.appendChild(e.createTextNode(t)))) | |
} | |
)), | |
Promise.all(n).then(()=>e) | |
} | |
class Ht { | |
constructor(e) { | |
this.options = e || {}, | |
this.queue = [] | |
} | |
static get PROCESSOR_TASK() { | |
return { | |
REMOVE_ROOT_SPACING: We, | |
SPLIT_CSS_FONT_SHORTHAND: Ve, | |
PATCH_CSS_FONT_SIZES: Ue, | |
REMOVE_CSS_FONTS: Fe, | |
EMBED_CSS_IMAGES: Ke, | |
EMBED_CSS_IMPORT_RULES: Ge, | |
REMOVE_CSS_TEXT_ALIGN: He, | |
REMOVE_CSS_LINE_HEIGHT: qe, | |
REMOVE_CSS_COLOR: ze, | |
EMBED_CSS_FONTS: D, | |
SET_LANG_ATTRIBUTE: kt, | |
PREPROCESS_LINKS: At, | |
CONVERT_SVG_IMAGES: Ct, | |
EMBED_HTML_IMAGES: It, | |
EMBED_SCRIPTS: Ft, | |
PREPROCESS_AUDIO_VIDEO: Rt, | |
SPLIT_FONT_SHORTHAND: Tt, | |
REMOVE_FONT_FAMILIES: Pt, | |
REMOVE_TEXT_ALIGN: Lt, | |
REMOVE_LINE_HEIGHT: Bt, | |
REMOVE_COLOR: Nt, | |
PROCESS_STYLES: Kt | |
} | |
} | |
addTask(e) { | |
var t = Ht.PROCESSOR_TASK[e]; | |
this.queue.push(e=>t(e, this.options)) | |
} | |
startProcessing(e) { | |
var t = function(e, t) { | |
if (qt(e)) | |
Array.prototype.forEach.call(e.querySelectorAll("img"), (function(e) { | |
e.setAttribute("data-src", e.getAttribute("src")), | |
e.removeAttribute("src") | |
} | |
)), | |
function(e, t) { | |
var n = e.body || e.querySelector("body") || e | |
, r = e.createElement("div"); | |
r && (r.setAttribute("id", "vspace_" + p(t.root)), | |
r.setAttribute("class", _.a.READER.SPACER_CLASSNAME), | |
n.appendChild(r)) | |
}(e, t); | |
else if ("string" == typeof e) { | |
var n = zt.parse(e); | |
if (n.cssRules) | |
return Promise.resolve(n) | |
} | |
return Promise.resolve(e) | |
}(e, this.options); | |
return this.queue.push(e=>(this.queue.length = 0, | |
this.options = null, | |
Promise.resolve("function" == typeof e.cssText ? e.cssText() : e))), | |
this.queue.reduce((function(e, t) { | |
return e.then(t) | |
} | |
), t) | |
} | |
} | |
const zt = new Me; | |
function qt(e) { | |
return e && (e.nodeType === Node.DOCUMENT_FRAGMENT_NODE || e.nodeType === Node.DOCUMENT_NODE ? /XML|X?HTML/i.test(e.documentElement.nodeName) : e.ownerDocument && qt(e.ownerDocument)) | |
} | |
function Wt(e, t, n, r) { | |
var i = new Ht(n) | |
, o = n.root | |
, s = a.getPlatform(n.window.navigator) | |
, u = _.a.READER.FONT.EMBEDDING; | |
return n.root = r, | |
n.fontEmbeddingLevel = "android" === s.OS && u.NONE || "ios" === s.OS && u.LIMIT_TOTAL || u.LIMIT_SINGLE, | |
i.addTask("EMBED_CSS_IMPORT_RULES"), | |
i.addTask("REMOVE_ROOT_SPACING"), | |
i.addTask("SPLIT_CSS_FONT_SHORTHAND"), | |
n.hasFixedLayout || i.addTask("PATCH_CSS_FONT_SIZES"), | |
i.addTask("EMBED_CSS_FONTS"), | |
i.addTask("REMOVE_CSS_FONTS"), | |
i.addTask("EMBED_CSS_IMAGES"), | |
i.startProcessing(e).then((function(e) { | |
n.root = o, | |
t.textContent = e | |
} | |
)) | |
} | |
function Kt(e, t) { | |
var n = [] | |
, r = e.querySelectorAll('style[type="text/css"], link[rel^="style"]') || []; | |
return Array.prototype.forEach.call(r, (function(e) { | |
n.push(function(e, t) { | |
if (/^LINK$/i.test(e.nodeName)) { | |
var n = h(e.getAttribute("href"), t.root) | |
, r = t.files[n]; | |
if (!r) | |
return console.warn('ContentProcessor.processCSS: Referenced file "' + n + '" not found'), | |
e.parentNode.removeChild(e), | |
Promise.resolve(); | |
var i = e.ownerDocument.createElement("style"); | |
return i.setAttribute("type", "text/css"), | |
e.parentNode.replaceChild(i, e), | |
r.extract().then(()=>Wt(r.getFileContentAsString(), i, t, n)) | |
} | |
return Wt(e.textContent, e, t, t.root) | |
}(e, t)) | |
} | |
)), | |
function(e, t) { | |
var n = e.querySelector("head") || e.body; | |
if (n) { | |
var r = e.createElement("link"); | |
r.setAttribute("id", _.a.READER.STYLES_SHEET_ID), | |
r.setAttribute("rel", "stylesheet"), | |
r.setAttribute("type", "text/css"), | |
r.setAttribute("href", "assets/styles/epubreader.css"), | |
n.appendChild(r) | |
} | |
}(e, t.window), | |
t.fontStyleSheet = function(e) { | |
var t = _.a.READER.FONT.PUBLICATION_SHEET_ID | |
, n = e.getElementById(t); | |
return n || ((n = e.createElement("style")).type = "text/css", | |
n.id = t, | |
(e.querySelector("head") || e).appendChild(n)), | |
n | |
}(window.document), | |
Promise.all(n).then(()=>e) | |
} | |
var Gt = 0; | |
function Vt() { | |
return Date.now() - Gt | |
} | |
function Qt(e) { | |
return e.fetchTime().then(e=>{ | |
var t = Number.parseInt(e, 10); | |
!t || isNaN(t) ? console.warn("Invalid remote time", e) : Gt = Date.now() - new Date(t).getTime() | |
} | |
).catch(e=>{ | |
console.warn("Could not fetch remote time", e) | |
} | |
) | |
} | |
var Yt = n("./musketeer/modules/tolino-shared/services/StringUtil.js") | |
, Zt = n("./musketeer/modules/tolino-shared/services/TextToSpeech.js"); | |
n("./musketeer/modules/tolino-shared/services/AESDecrypt.js"); | |
const $t = /([^#]*)#point\(([^:\)]*):?(\d*)\)/i | |
, Xt = { | |
img: 1, | |
head: 0, | |
meta: 0, | |
style: 0, | |
script: 0 | |
}; | |
function Jt(e) { | |
return e.ownerDocument || (a.isDocumentNode(e) ? e : null) | |
} | |
function en(e) { | |
for (var t = -1; e; ) | |
a.isEnumerableNode(e) && t++, | |
e = e.previousSibling; | |
return t | |
} | |
function tn(e, t) { | |
for (var n = e && e.firstChild; n && (t > 0 || !a.isEnumerableNode(n)); ) | |
a.isEnumerableNode(n) && t--, | |
n = n.nextSibling; | |
return n || e.lastChild || e | |
} | |
function nn(e) { | |
if (!e) | |
return 0; | |
if ("_charCount"in e) | |
return e._charCount; | |
var t = e.nodeName; | |
if ("#text" === t || "#cdata-section" === t || e.nodeType === Node.ENTITY_REFERENCE_NODE) | |
return e.length; | |
if (t in Xt) | |
return Xt[t]; | |
for (var n = e.firstChild, r = 0; n; ) | |
r += nn(n), | |
n = n.nextSibling; | |
return e._charCount = r | |
} | |
function rn(e, t) { | |
for (var n, r = []; e && e !== t; ) | |
a.isMetaNode(e) && (r.length = 0, | |
e.previousSibling && (e = e.previousSibling)), | |
n = Math.max(0, en(e)) + 1, | |
r.unshift(n), | |
e = e.parentNode; | |
return r.unshift(1), | |
r | |
} | |
function on(e, t) { | |
for (var n = t, r = 1, i = e.length; r < i && n; r++) { | |
n = tn(n, e[r] - 1) | |
} | |
return n | |
} | |
function sn(e, t) { | |
if (!e || !t) | |
return Boolean(e) - Boolean(t); | |
for (var n = 0; ; n++) { | |
if (void 0 === e[n]) | |
return void 0 === t[n] ? 0 : -1; | |
if (void 0 === t[n]) | |
return 1; | |
var r = e[n] - t[n]; | |
if (0 !== r) | |
return r | |
} | |
} | |
function an(e, t) { | |
var n; | |
if (e.nodeType === Node.TEXT_NODE && e.length > 0 && (n = a.getTextBoundingBox(e)) && n.right > t.left && n.bottom - n.lineHeight >= t.top) { | |
if (n.left >= 0) | |
return !0; | |
var r = a.getRange(e).getClientRects() | |
, i = r[r.length - 1]; | |
return i.right > t.left && i.bottom >= t.top || (i = r[r.length - 2]) && i.bottom >= t.top | |
} | |
return !1 | |
} | |
function un(e, t) { | |
var n = a.getBoundingBox(e); | |
return n && n.height > 0 && n.right > t.left && n.left < t.right && n.bottom > t.top && n.top < t.bottom | |
} | |
class ln { | |
constructor(e, t, n, r) { | |
this.setRootNode(e), | |
this.setFileName(t), | |
this.setNode(n), | |
this.setCharOffset(r) | |
} | |
static getOffsetNode(e, t) { | |
return a.isTextNode(e) ? e : tn(e, t) | |
} | |
static getCharCountForNode(e) { | |
return nn(e) | |
} | |
static compareLocalPosition(e, t) { | |
return sn(e.childSequence, t.childSequence) || e.offset - t.offset | |
} | |
static parseRMSDKPosition(e) { | |
var t = "" | |
, n = [] | |
, r = 0 | |
, i = e && e.match($t); | |
return i && (t = i[1], | |
(n = i[2].split("/").map(e=>parseInt(e, 10))).length > 0 && isNaN(n[0]) && n.shift(), | |
r = parseInt(i[3], 10), | |
isNaN(r) && (r = 0)), | |
{ | |
fileName: t, | |
childSequence: n, | |
offset: r | |
} | |
} | |
static parseRMSDKFileName(e) { | |
return e ? e.substr(0, e.indexOf("#")) : "" | |
} | |
static setRangeBoundary(e, t, n, r) { | |
function i() { | |
for (var e; t.nextSibling && n >= (e = Yt.getByteOffset(t)); ) | |
n -= e, | |
t = t.nextSibling | |
} | |
for (i(); n > 0 && t.childNodes.length > 0; ) | |
t = t.firstChild, | |
i(); | |
n = a.isTextNode(t) ? Math.max(0, Math.min(Yt.getCharOffsetForUTF8Bytes(t.textContent, n), t.length)) : Math.max(0, Math.min(n, t.childNodes.length - 1)), | |
r.call(e, t, n) | |
} | |
static getRangeAtPosition(e, t, n) { | |
var r, i = Math.floor(e.left), o = Math.floor(e.top); | |
return t && t.parentNode && (!a.isTextNode(t) && t.firstChild && (t = t.firstChild), | |
(r = Jt(t).createRange()).selectNode(t), | |
function(e, n) { | |
r.setStart(t, e), | |
r.setEnd(t, n); | |
for (var s = r.getClientRects(), a = Math.max(1, Math.floor((n - e) / (s.length + 1))), u = s[0]; u && (u.left < i || u.bottom < o) && e < n; ) | |
e += a, | |
r.setStart(t, Math.min(e, n - 1)), | |
u = r.getClientRects()[0]; | |
r.setEnd(t, Math.min(e + 1, n)) | |
}(0, t.length), | |
void 0 !== n && (function(e, n) { | |
for (var i; e < n - 1; ) | |
i = e + n >> 1, | |
r.setStart(t, i), | |
1 === r.getClientRects().length ? n = i : e = i; | |
r.setStart(t, n) | |
}(0, r.startOffset), | |
function(e, n) { | |
for (var i; e < n - 1; ) | |
i = e + n >> 1, | |
r.setEnd(t, i), | |
1 === r.getClientRects().length ? e = i : n = i; | |
r.setEnd(t, e < n ? e : n) | |
}(r.endOffset, t.length), | |
"number" == typeof n && function(e) { | |
for (var n = r.startOffset, i = r.endOffset - 1, o = r.getClientRects()[0], s = 0; n < i && o && o.left < e; ) { | |
if (0 === (s = r.toString().search(/\s/) + 1)) | |
return; | |
n += s, | |
r.setStart(t, n), | |
o = r.getClientRects()[0] | |
} | |
r.setStart(t, n - s), | |
s && r.setEnd(t, n - 1) | |
}(n))), | |
r | |
} | |
setRootNode(e) { | |
this.rootNode = e | |
} | |
setFileName(e) { | |
this.fileName = e | |
} | |
setNode(e) { | |
(null === e || e && e.parentNode) && (this.node = e, | |
this.childSequence = rn(e, this.rootNode)) | |
} | |
setCharOffset(e) { | |
this.offset = this.node && e > 0 ? Yt.lengthInUTF8Bytes(this.node.textContent.substr(0, e)) : e || 0 | |
} | |
setByteOffset(e) { | |
this.offset = e || 0 | |
} | |
clear() { | |
this.rootNode = null, | |
this.fileName = null, | |
this.node = null, | |
this.childSequence = null, | |
this.offset = 0 | |
} | |
copyPosition(e) { | |
this.setRootNode(e.rootNode), | |
this.setFileName(e.fileName), | |
this.setNode(e.node), | |
this.setByteOffset(e.offset) | |
} | |
isEqualTo(e) { | |
return !(!e || this.fileName !== e.fileName || this.offset !== e.offset) && (this.childSequence.length === e.childSequence.length && 0 === sn(this.childSequence, e.childSequence)) | |
} | |
asRMSDKPositionString(e, t, n) { | |
return e || (e = this.fileName), | |
t || (t = this.childSequence || []), | |
void 0 === n && (n = this.offset), | |
e + "#point(/" + t.join("/") + ":" + (n || "0") + ")" | |
} | |
getRMSDKPosition(e, t) { | |
var n = [] | |
, r = 0; | |
if (t = t || this.node || this._getFirstLeafNode()) { | |
n = rn(t, this.rootNode), | |
r = this._getAdjustedOffset(); | |
var i = Yt.getByteOffset(t); | |
r > i && function(e) { | |
return a.isTextNode(e) && !a.isMetaNode(e.previousSibling) && !a.isMetaNode(e.parentNode) | |
}(t) && (r = i - 1) | |
} | |
return e ? { | |
fileName: this.fileName, | |
childSequence: n, | |
offset: r | |
} : this.asRMSDKPositionString(this.fileName, n, r) | |
} | |
setRMSDKPosition(e) { | |
if (!this.rootNode) | |
return console.warn('Undefined publication root node for "' + e + '"'), | |
!1; | |
var t = ln.parseRMSDKPosition(e) | |
, n = t && t.fileName; | |
return n !== this.fileName ? (console.warn('requested file "' + n + '" different to current file "' + this.fileName + '"'), | |
!1) : (t.childSequence.length > 1 ? (this.setNode(on(t.childSequence, this.rootNode)), | |
this.setByteOffset(t.offset)) : (console.warn('invalid child sequence defined by RMSDK position "' + e + '"'), | |
this.setNode(this.rootNode.querySelector("body")), | |
this.setByteOffset(0)), | |
!0) | |
} | |
getChildSequence(e) { | |
return e ? this.childSequence : this.childSequence.join("/") | |
} | |
getChildSequenceForAnchorID(e, t) { | |
var n, r; | |
return this.rootNode ? (e && null !== (n = this.rootNode.querySelector("[id='" + e + "']")) || (n = this._getFirstLeafNode()), | |
r = rn(n, this.rootNode), | |
t ? r : r.join("/")) : "" | |
} | |
getOffsetPosition(e) { | |
var t, n, r, i, o, s = this.node || this._getFirstLeafNode(); | |
if (!s) | |
return null; | |
if (e || (e = "top"), | |
n = (t = this.rootNode && this.rootNode.querySelector("body") || this._getFirstLeafNode()) && t.getBoundingClientRect() || { | |
top: 0, | |
left: 0 | |
}, | |
a.isTextNode(s)) | |
for (i = this.offset; i >= (o = Yt.getByteOffset(s)) && s.nextSibling; ) | |
i -= o, | |
s = s.nextSibling; | |
return a.isElementNode(s) ? (r = a.getBoundingBox(s))[e] - n[e] : (r = a.getTextBoundingBox(s, i)) && r[e] - n[e] | |
} | |
getRMSDKRange(e, t) { | |
var n = ln.parseRMSDKPosition(e) | |
, r = ln.parseRMSDKPosition(t) | |
, i = this.rootNode; | |
if (!i || !n.fileName || !r.fileName) | |
return null; | |
if (ln.compareLocalPosition(n, r) > 0) { | |
var o = n; | |
n = r, | |
r = o | |
} | |
var s = Jt(i).createRange() | |
, a = on(n.childSequence, i) | |
, u = on(r.childSequence, i); | |
return ln.setRangeBoundary(s, a, n.offset, s.setStart), | |
ln.setRangeBoundary(s, u, r.offset, s.setEnd), | |
s | |
} | |
setByRange(e) { | |
a.isCharacterDataNode(e.startContainer) ? (this.setNode(e.startContainer), | |
this.setCharOffset(e.startOffset)) : (this.setNode(e.startContainer.childNodes[e.startOffset]), | |
this.setByteOffset(0)) | |
} | |
setByClientRectangle(e, t) { | |
var n = this.rootNode; | |
if (n) { | |
n = n.querySelector("body") || n; | |
var r = this._getNodeAtClientRectangle(e, n, !1, t) || this._getFirstLeafNode() | |
, i = ln.getRangeAtPosition(e, r, !0) | |
, o = i && (t ? i.endOffset : i.startOffset); | |
this.setNode(r), | |
this.setCharOffset(o || 0) | |
} | |
} | |
getFirstNodeAtClientRectangle(e, t, n) { | |
return this._getNodeAtClientRectangle(e, t, n) | |
} | |
getLastNodeAtClientRectangle(e, t, n) { | |
return this._getNodeAtClientRectangle(e, t, n, !0) | |
} | |
isNodeInViewport(e, t, n, r) { | |
function i(t) { | |
return n && e.left <= t.left && t.right <= e.right || !n && e.top < t.bottom && t.top < e.bottom | |
} | |
var o = a.getBoundingBox(t); | |
if (0 === o.width) | |
return i(o); | |
var s = a.getRange(t).getClientRects(); | |
if (r >= 0) { | |
var u = s.length - 1; | |
return i(s[Math.min(Math.floor(u * r), u)]) | |
} | |
return Array.prototype.some.call(s, i) | |
} | |
getPageNumberByList(e) { | |
var t = e.toc && e.toc.pageList; | |
if (!t) | |
return -1; | |
for (var n = e.spineIndex[this.fileName] || 0, r = { | |
pageNum: 0 | |
}, i = 0, o = t.length; i < o; i++) { | |
var s = t[i]; | |
if (s.fileIndex > n) | |
return r.pageNum; | |
if (s.fileIndex === n && sn(this.getChildSequenceForAnchorID(s.anchorID, !0), this.childSequence) >= 0) | |
return r.fileIndex === n ? r.pageNum : s.pageNum; | |
r = s | |
} | |
return r.pageNum | |
} | |
getCharCount() { | |
var e = this.node; | |
if (!e) | |
return 0; | |
for (var t = Jt(e).querySelector("body"), n = a.isTextNode(e) ? this.offset : 0; e && e !== t; ) { | |
for (var r = e.parentNode; null !== (e = e.previousSibling); ) | |
n += nn(e); | |
e = r | |
} | |
return n | |
} | |
_getFirstLeafNode() { | |
for (var e = this.rootNode && this.rootNode.querySelector("body"); e && e.firstElementChild; ) | |
e = e.firstElementChild; | |
return e | |
} | |
_getAdjustedOffset() { | |
var e = this.node || this._getFirstLeafNode() | |
, t = this.offset | |
, n = e.parentNode; | |
if (n && a.isMetaNode(n)) { | |
for (; e.previousSibling; ) | |
e = e.previousSibling, | |
t += Yt.getByteOffset(e); | |
e = n | |
} | |
for (; a.isSplittedTextNode(e) || a.isMetaNode(e); ) | |
e = e.previousSibling, | |
t += Yt.getByteOffset(e), | |
a.isMetaNode(e) && (e = e.previousSibling, | |
t += Yt.getByteOffset(e)); | |
return t | |
} | |
_getNodeAtClientRectangle(e, t, n, r) { | |
var i = r ? -1 : 1 | |
, o = n ? an : un; | |
function s(t, n, r) { | |
var i = function(e, t, n) { | |
if (t <= n) | |
for (var r = t + n >> 1, i = 0; t <= r && r <= n; ) { | |
if (a.isElementNode(e[r])) | |
return r; | |
r += i = i > 0 ? -i - 1 : 1 - i | |
} | |
return -1 | |
}(t.childNodes, n, r); | |
if (i < 0) | |
return null; | |
var o = t.childNodes[i]; | |
if (u(o)) | |
return i; | |
var l = a.getBoundingBox(o); | |
return l ? l.right <= e.left || l.bottom <= e.top ? s(t, i + 1, r) : s(t, n, i - 1) : null | |
} | |
function u(t) { | |
var n, l, c = t ? t.childNodes.length : 0; | |
if (1 === c) | |
n = u(t.firstChild); | |
else if (c > 0) { | |
var d, f = r ? c - 1 : 0, h = r ? -1 : c; | |
if (c > 50 && null !== (d = s(t, 0, c - 1))) | |
for (; l = t.childNodes[d]; ) { | |
if (a.isElementNode(l)) { | |
var p = u(l); | |
if (!p || d === f) | |
break; | |
n = p | |
} | |
d -= i | |
} | |
for (d = f; !n && d !== h; d += i) | |
n = u(t.childNodes[d]) | |
} | |
return n || o(t, e) && t || null | |
} | |
return e = function(e) { | |
return { | |
top: Math.floor(e.top), | |
left: Math.floor(e.left), | |
bottom: "bottom"in e ? Math.floor(e.bottom) : null, | |
right: "right"in e ? Math.floor(e.right) : null | |
} | |
}(e), | |
u(t || this.rootNode) | |
} | |
} | |
function cn(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
const dn = _.a.READER.ANNOTATIONS.DOGEAR_CLASSNAME; | |
function fn(e, t) { | |
e && e.setAttribute("data-meta", t) | |
} | |
function hn(e, t, n) { | |
t && e.style.backgroundColor, | |
!n && e.hasAttribute("title") ? e.removeAttribute("title") : n && n !== e.getAttribute("title") && e.setAttribute("title", n) | |
} | |
function pn(e) { | |
var t = e && e.match(/([^#]*)#point\(([^)]*)\)/i); | |
return t ? t[1].split("/").pop() + t[2] : e || "" | |
} | |
function mn(e) { | |
if (!e) | |
return null; | |
var t, n = pn(e.rmsdkPosition); | |
return e.endPosition && (n += pn(e.endPosition)), | |
t = n, | |
Array.prototype.reduce.call(t, (e,t)=>(e << 5) - e + t.charCodeAt(0) | 0, 0) | |
} | |
function bn(e, t) { | |
return e = parseInt(e, 10), | |
t.findIndex(t=>mn(t) === e) | |
} | |
function gn(e) { | |
if ("dogear" === a.getMetaAttribute(e)) { | |
var t = e.parentNode; | |
0 === e.childNodes.length ? t.removeChild(e) : t.replaceChild(e.firstChild, e), | |
t.normalize() | |
} else | |
e && (e.classList.remove(dn), | |
e.removeAttribute("data-ref")) | |
} | |
class yn { | |
constructor(e, t) { | |
cn(this, "setComment", e=>{ | |
const t = _.a.READER.ANNOTATIONS.COMMENT_COLOR | |
, n = mn(e) | |
, r = this.rootNode.querySelectorAll('[data-ref="' + n + '"]'); | |
if (e.deleted) | |
return 0 !== r.length && (Array.prototype.forEach.call(r, a.unwrapNode), | |
!0); | |
if (r.length > 0) | |
Array.prototype.forEach.call(r, n=>{ | |
hn(n, t, e.markerComment) | |
} | |
); | |
else { | |
var i = this.pageLocation.getRMSDKRange(e.rmsdkPosition, e.endPosition); | |
this._highlightRange(i, { | |
metaAttr: "comment", | |
dataRef: n, | |
color: t, | |
note: e.markerComment | |
}) | |
} | |
return !0 | |
} | |
), | |
cn(this, "setDogEar", e=>!e.deleted && (!!this.pageLocation.setRMSDKPosition(e.rmsdkPosition) && this._insertDogEarMarkup(e))), | |
this.pageLocation = new ln, | |
this.setPageLocation(e, t) | |
} | |
static hasComment(e) { | |
return "comment" === a.getMetaAttribute(e) | |
} | |
static isRangeInComment(e) { | |
var t = function(e) { | |
var t; | |
return e instanceof Range && !e.collapsed && (t = e.commonAncestorContainer, | |
a.isTextNode(t) && (t = t.parentNode)), | |
t | |
}(e); | |
return !!t && yn.hasComment(t) | |
} | |
static getNote(e) { | |
return "comment" === a.getMetaAttribute(e) && e.getAttribute("title") || "" | |
} | |
static getDogEarFromNode(e) { | |
if (!e) | |
return null; | |
if (a.isElementNode(e)) { | |
if (e.classList.contains(dn)) | |
return e; | |
var t = e.getElementsByClassName(dn); | |
return t.length > 0 ? t[0] : null | |
} | |
do { | |
e = e.parentNode | |
} while (a.isElementNode(e) && /inline/.test(getComputedStyle(e).display));return a.isElementNode(e) ? e.getElementsByClassName(dn)[0] : null | |
} | |
static getIndexByNode(e, t) { | |
var n = e.getAttribute("data-ref"); | |
return n ? bn(n, t) : -1 | |
} | |
static getAnnotationKey(e) { | |
return mn(e) | |
} | |
setPageLocation(e, t) { | |
this.contentDoc = e, | |
this.rootNode = e ? e.documentElement : null, | |
this.pageLocation.setRootNode(this.rootNode), | |
this.pageLocation.setFileName(t) | |
} | |
getAnnotationNode(e) { | |
var t = mn(e); | |
return this.rootNode && this.rootNode.querySelector('[data-ref="' + t + '"]') | |
} | |
removeAnnotation(e, t) { | |
var n = this.getAnnotationNode(e); | |
return n ? "endPosition"in e ? this.removeComment(n, t) >= 0 : this.removeDogEar(n, t) >= 0 : t.indexOf(e) | |
} | |
selectWordAtPosition(e, t, n) { | |
var r = { | |
left: t, | |
top: n | |
} | |
, i = this.pageLocation.getFirstNodeAtClientRectangle(r, e, !0) || e | |
, o = a.getBoundingBox(i); | |
if (o) { | |
r.left = Math.max(0, o.left), | |
r.height = o.lineHeight || 0; | |
var s = ln.getRangeAtPosition(r, i, t); | |
if (s) | |
return this._setSelection(s), | |
s | |
} | |
return null | |
} | |
selectCommentRange(e) { | |
if (yn.hasComment(e)) { | |
var t = this._getCommentRangeForNode(e); | |
return this._setSelection(t), | |
t | |
} | |
return null | |
} | |
setSearchMark(e) { | |
var t = this.pageLocation.getRMSDKRange(e.rmsdkPosition, e.endPosition); | |
t && this._highlightRange(t, { | |
metaAttr: "searchMark", | |
color: _.a.READER.ANNOTATIONS.SEARCHMARK_COLOR | |
}) | |
} | |
removeSearchMark() { | |
var e = this.contentDoc.querySelectorAll('[data-meta="searchMark"]'); | |
Array.prototype.forEach.call(e, a.unwrapNode) | |
} | |
createComment(e, t) { | |
const n = e && Yt.compactString(e.toString()); | |
if (!n) | |
return null; | |
this.pageLocation.setNode(e.startContainer), | |
this.pageLocation.setCharOffset(e.startOffset); | |
const r = this.pageLocation.getRMSDKPosition(); | |
this.pageLocation.setNode(e.endContainer), | |
this.pageLocation.setCharOffset(e.endOffset); | |
const i = this.pageLocation.getRMSDKPosition() | |
, o = { | |
deliverableId: t, | |
modified: Vt(), | |
markedBookText: n, | |
markerColor: 1, | |
deleted: !1, | |
rmsdkPosition: r, | |
endPosition: i | |
}; | |
return this.setComment(o), | |
o | |
} | |
getMarkedBookText(e) { | |
var t = this._getCommentRangeForNode(e); | |
return t ? Yt.compactString(t.toString()) : "" | |
} | |
removeComment(e, t) { | |
if (!yn.hasComment(e)) | |
return -1; | |
var n = e.getAttribute("data-ref"); | |
if (n) { | |
var r = bn(n, t); | |
if (r >= 0) { | |
var i = this.contentDoc.querySelectorAll('[data-ref="' + n + '"]'); | |
return Array.prototype.forEach.call(i, a.unwrapNode), | |
r | |
} | |
} | |
return -1 | |
} | |
updateComment(e, t, n) { | |
if (!yn.hasComment(e)) | |
return !1; | |
var r = e.getAttribute("data-ref"); | |
if (r) { | |
var i = bn(r, t); | |
if (i >= 0 && t[i].markerComment !== markerComment) { | |
t[i].markerComment = markerComment, | |
t[i].modified = Vt(); | |
for (var o = this.contentDoc.querySelectorAll('[data-ref="' + r + '"]'), s = 0; s < o.length; s++) | |
hn(o[s], null, n); | |
return !0 | |
} | |
} | |
return !1 | |
} | |
createDogEar(e, t) { | |
if (!e) | |
return null; | |
var n = this.rootNode | |
, r = this.contentDoc; | |
this.pageLocation.setByRange(e); | |
var i = { | |
deliverableId: t, | |
rmsdkPosition: this.pageLocation.getRMSDKPosition(), | |
displayName: function() { | |
var t = e.toString(); | |
if (!t) { | |
for (var i = e.startContainer; i && i !== n && "" === (t = i.textContent.trim()); ) | |
i = i.nextSibling || i.parentNode.nextSibling || i.parentNode; | |
if (!t) { | |
var o = r.querySelector("meta[name='description']"); | |
t = o ? o.getAttribute("content") : r.title | |
} | |
} | |
return function(e) { | |
if ("string" != typeof e) | |
return "..."; | |
var t = _.a.READER.ANNOTATIONS.TEXT_SAMPLE_MAX_LEN; | |
return (e = Yt.compactString(e)).length <= t ? e || "..." : e.substr(0, t - 3) + "..." | |
}(t) | |
}(), | |
modified: Vt(), | |
deleted: !1 | |
}; | |
return this._insertDogEarMarkup(i) ? i : null | |
} | |
getDogEarIndex(e, t) { | |
return e ? (this.pageLocation.setNode(e.startContainer), | |
this.pageLocation.setCharOffset(e.startOffset), | |
bn(mn({ | |
rmsdkPosition: this.pageLocation.getRMSDKPosition() | |
}), t)) : -1 | |
} | |
removeDogEar(e, t) { | |
var n = e.classList.contains(dn) ? e : yn.getDogEarFromNode(e) | |
, r = n && n.getAttribute("data-ref"); | |
if (r) { | |
var i = bn(r, t); | |
if (i >= 0) { | |
var o = this.contentDoc.querySelectorAll('[data-ref="' + r + '"]'); | |
return Array.prototype.forEach.call(o, gn), | |
i | |
} | |
} | |
return -1 | |
} | |
restoreDogEar(e) { | |
e.modified = Vt(), | |
e.deleted = !1, | |
this.setDogEar(e) | |
} | |
_getCommentRangeForNode(e) { | |
var t, n = e && (yn.hasComment(e) ? e : e.querySelector("[data-meta='comment']")); | |
if (n) { | |
var r = n.getAttribute("data-ref") | |
, i = this.rootNode.querySelectorAll('[data-ref="' + r + '"]') | |
, o = i[i.length - 1]; | |
(t = this.contentDoc.createRange()).setStart(i[0], 0), | |
t.setEnd(o, o.childNodes.length) | |
} | |
return t | |
} | |
_setSelection(e) { | |
var t; | |
e && (t = this.contentDoc.getSelection()) && (t.rangeCount > 0 && t.removeAllRanges(), | |
t.addRange(e)) | |
} | |
_highlightRange(e, t) { | |
if (e && this.contentDoc) { | |
var n = ln.getOffsetNode(e.startContainer, e.startOffset) | |
, r = ln.getOffsetNode(e.endContainer, e.endOffset) | |
, i = this.contentDoc | |
, o = i.defaultView.Range; | |
if (n === r) | |
l(e); | |
else { | |
var s = function(e) { | |
var t = i.createRange(); | |
return function n(r, i) { | |
return Array.prototype.reduce.call(r.childNodes, (r,i)=>a.isTextNode(i) ? (function(n) { | |
return t.selectNode(n), | |
-1 === e.compareBoundaryPoints(o.END_TO_START, t) && 1 === e.compareBoundaryPoints(o.START_TO_END, t) | |
}(i) && r.push(i), | |
r) : n(i, r), i) | |
}(e.commonAncestorContainer, []) | |
}(e) | |
, u = i.createRange(); | |
s.forEach(t=>{ | |
var i; | |
u.selectNode(t), | |
t === n ? (i = Yt.getByteOffset(t, e.startOffset), | |
ln.setRangeBoundary(u, t, i, o.prototype.setStart)) : t === r && (i = Yt.getByteOffset(t, e.endOffset), | |
ln.setRangeBoundary(u, t, i, o.prototype.setEnd)), | |
l(u) | |
} | |
) | |
} | |
} else | |
console.warn("highlightRange: range object or content document not defined"); | |
function l(e) { | |
var n = i.createElement("x-mark"); | |
fn(n, t.metaAttr), | |
t.dataRef && n.setAttribute("data-ref", t.dataRef), | |
hn(n, t.color, t.note), | |
e.surroundContents(n) | |
} | |
} | |
_insertDogEarMarkup(e) { | |
var t = this.pageLocation.node | |
, n = this.contentDoc.createElement("x-mark"); | |
if (n.classList.add(dn), | |
n.setAttribute("data-ref", mn(e)), | |
fn(n, "dogear"), | |
a.isTextNode(t)) { | |
var r = this.contentDoc.createRange() | |
, i = Math.min(this.pageLocation.offset + 1, t.length); | |
r.setStart(t, i), | |
r.setEnd(t, i), | |
r.surroundContents(n) | |
} else | |
t.parentNode.insertBefore(n, t); | |
return !0 | |
} | |
} | |
n("./node_modules/core-js/modules/es.typed-array.uint8-array.js"); | |
var vn = n("./musketeer/modules/tolino-shared/services/zip/zip.worker.js") | |
, _n = n.n(vn); | |
var wn = class { | |
constructor() { | |
this.taskQueue = [], | |
this.worker = []; | |
for (let e = 0; e < _.a.SYSTEM.MAX_WORKER; e++) { | |
let t; | |
t = this.worker[e] = _n()(), | |
t.postMessage("") | |
} | |
} | |
addToQueue(e, t) { | |
let n = { | |
resolve: null, | |
reject: null | |
} | |
, r = function(e, t) { | |
let n = e.taskQueue.length; | |
for (; n > 0 && t > e.taskQueue[n - 1].priority; ) | |
n--; | |
return n | |
}(this, t = t || 0); | |
const i = new Promise((e,t)=>{ | |
n.resolve = e, | |
n.reject = t | |
} | |
); | |
return this.taskQueue.splice(r, 0, { | |
data: e, | |
deferred: n, | |
priority: t | |
}), | |
function e(t) { | |
const n = t.worker | |
, r = t.taskQueue; | |
if (n.length <= 0 || r.length <= 0) | |
return !1; | |
const i = n.pop() | |
, o = r.shift(); | |
let s = function(a) { | |
const u = a.data; | |
let l = !0; | |
for (i.removeEventListener("message", s), | |
n.push(i); r.length > 0 && l; ) | |
l = e(t); | |
o.deferred.resolve(u), | |
s = null | |
}; | |
return i.addEventListener("message", s, !1), | |
i.postMessage(o.data), | |
!0 | |
}(this), | |
i | |
} | |
destroy() { | |
for (var e = this.worker ? this.worker.length : 0, t = 0; t < e; t++) | |
this.worker[t].terminate && this.worker[t].terminate(); | |
this.worker.length = 0, | |
this.taskQueue.length = 0 | |
} | |
} | |
, Sn = n("./musketeer/modules/tolino-shared/services/zip/ByteArray.js"); | |
var En = class { | |
constructor(e, t) { | |
this.headers = e, | |
this.archive = t, | |
this.workerManager = t.getWorkerManager(), | |
this.fileContent = null, | |
this.fileContentStart = function(e) { | |
const t = e.headers.localHeaderOffset | |
, n = e.archive.getLocalHeader("fileNameLength", t) | |
, r = e.archive.getLocalHeader("extraFieldLength", t); | |
return t + (_.a.SYSTEM.FIXED_LOCAL_HEADER_LENGTH + n + r) | |
}(this), | |
this.extractionPromise = null, | |
function(e) { | |
const t = e.headers.bitFlag; | |
e.headers.isUTF8 = 2048 == (2048 & t), | |
e.headers.usesTrailingDescriptor = 8 == (8 & t), | |
e.headers.isEncrypted = 1 == (1 & t) | |
}(this) | |
} | |
getFileContentAsString() { | |
const e = this.fileContent; | |
if (!e) | |
return ""; | |
return Sn.a.hasUTF16ByteOrderMark(e) ? Sn.a.asUTF16String(e) : Sn.a.asUTF8String(e) | |
} | |
getFileContentAsBase64() { | |
return this.fileContent ? Sn.a.asBase64(this.fileContent) : "" | |
} | |
extract(e) { | |
if (this.isExtracted()) | |
return Promise.resolve(this.fileContent); | |
if (this.extractionPromise) | |
return this.extractionPromise; | |
const t = this.archive.getArrayBuffer() | |
, n = this.headers.compressionMethod | |
, r = new Uint8Array(t,this.fileContentStart,this.headers.compressedSize); | |
if (0 === n) | |
return this.fileContent = r, | |
Promise.resolve(r); | |
const i = this.headers.uncompressedSize; | |
return this.extractionPromise = this.workerManager.addToQueue(r, e).then(e=>(e.length !== i && console.warn("Unzip: File size (" + e.length + " Bytes) not equal to the value given in header (" + i + " Bytes)"), | |
this.extractionPromise = null, | |
this.fileContent = e)) | |
} | |
isExtracted() { | |
return null !== this.fileContent | |
} | |
getFileContentAsDOM(e, t) { | |
var n = new DOMParser; | |
t || (t = this.getFileContentAsString()), | |
(t = Yt.unescapeEntities(t, !0)).indexOf('xml version="1.1"') > -1 && (t = t.replace('xml version="1.1"', 'xml version="1.0"')); | |
try { | |
return n.parseFromString(t, e || "text/xml") | |
} catch (e) { | |
return console.log('Parser Error in "getFileContentAsDOM":', e.message), | |
null | |
} | |
} | |
getCompressedSize() { | |
return this.headers.compressedSize | |
} | |
getUncompressedSize() { | |
return this.headers.uncompressedSize | |
} | |
releaseContent() { | |
this.fileContent = null | |
} | |
destroy() { | |
this.fileContent = null, | |
this.headers = null, | |
this.archive = null, | |
this.workerManager = null | |
} | |
} | |
; | |
const jn = [16, 4] | |
, xn = { | |
versionMadeBy: [0, 2], | |
versionNeedToExtract: [2, 2], | |
bitFlag: [4, 2], | |
compressionMethod: [6, 2], | |
lastModFileTime: [8, 2], | |
lastModFileDate: [10, 2], | |
crc32: [12, 4], | |
compressedSize: [16, 4], | |
uncompressedSize: [20, 4], | |
fileNameLength: [24, 2], | |
extraFieldLength: [26, 2], | |
fileCommentLength: [28, 2], | |
diskNumberStart: [30, 2], | |
internalFileAttributes: [32, 2], | |
externalFileAttributes: [34, 4], | |
localHeaderOffset: [38, 4] | |
} | |
, On = { | |
signature: [0, 4], | |
versionNeeded: [4, 2], | |
bitFlag: [6, 2], | |
compressionMethod: [8, 2], | |
lastModFileTime: [10, 2], | |
lastModFileDate: [12, 2], | |
crc32: [14, 4], | |
compressedSize: [18, 4], | |
uncompressedSize: [22, 4], | |
fileNameLength: [26, 2], | |
extraFieldLength: [28, 2] | |
} | |
, Mn = [80, 75, 5, 6] | |
, kn = [80, 75, 1, 2]; | |
function An(e, t) { | |
for (let n = 3; n >= 0; n--) | |
if (e[n] !== t[n]) | |
return !1; | |
return !0 | |
} | |
var Cn = class { | |
constructor(e) { | |
if (this.arrayBuffer = e, | |
this.workerManager = new wn, | |
this.centralDirectory = [], | |
this.files = {}, | |
this.numOfFiles = 0, | |
this.centralDirectoryStartPos = function(e) { | |
let t, n, r, i, o = e.arrayBuffer.byteLength - 22; | |
for (; o >= 0; ) { | |
if (t = new Uint8Array(e.arrayBuffer,o,4), | |
n = An(t, Mn), | |
n) | |
return r = jn, | |
i = new Uint8Array(e.arrayBuffer,o + r[0],r[1]), | |
Sn.a.asNumber(i); | |
o-- | |
} | |
return -1 | |
}(this), | |
this.centralDirectoryStartPos < 0) { | |
const e = this.arrayBuffer && this.arrayBuffer.byteLength || 0; | |
console.error("No start position of ZIP's central directory found (" + e + " bytes)") | |
} else | |
(function(e) { | |
let t = e.centralDirectoryStartPos; | |
const n = e.centralDirectory; | |
for (; ; ) { | |
if (!An(new Uint8Array(e.arrayBuffer,t,4), kn)) | |
return !0; | |
const r = {}; | |
let i = 0; | |
t += 4; | |
for (let n in xn) | |
if (xn.hasOwnProperty(n)) { | |
let o = xn[n] | |
, s = t + o[0] | |
, a = o[1] | |
, u = Sn.a.asNumber(new Uint8Array(e.arrayBuffer,s,a)); | |
r[n] = u, | |
"fileNameLength" !== n && "extraFieldLength" !== n && "fileCommentLength" !== n || (i += u) | |
} | |
t += 42; | |
const o = new Uint8Array(e.arrayBuffer,t,r.fileNameLength) | |
, s = Sn.a.asUTF8String(o); | |
r.fileName = f(s), | |
n.push(r), | |
t += i | |
} | |
return !0 | |
} | |
)(this) && function(e) { | |
e.numOfFiles = e.centralDirectory.length, | |
e.centralDirectory.forEach((function(t) { | |
e.files[t.fileName] = new En(t,e) | |
} | |
)) | |
}(this) | |
} | |
getLocalHeader(e, t) { | |
const n = On[e] | |
, r = t + n[0] | |
, i = n[1] | |
, o = new Uint8Array(this.arrayBuffer,r,i); | |
return Sn.a.asNumber(o) | |
} | |
getArrayBuffer() { | |
return this.arrayBuffer | |
} | |
setArrayBuffer(e) { | |
this.arrayBuffer = e | |
} | |
getWorkerManager() { | |
return this.workerManager | |
} | |
getFiles() { | |
return this.files | |
} | |
getFile(e) { | |
return this.files && this.files[e] | |
} | |
destroy() { | |
for (let e in this.files) | |
this.files.hasOwnProperty(e) && this.files[e].destroy(); | |
this.files = null, | |
this.arrayBuffer = null, | |
this.centralDirectory = null, | |
this.workerManager && (this.workerManager.destroy(), | |
this.workerManager = null) | |
} | |
} | |
; | |
const In = { | |
getAttribute: function() { | |
return null | |
} | |
}; | |
function Rn(e, t) { | |
return function(e) { | |
var t = e.getFile("META-INF/container.xml"); | |
if (!t) { | |
var n = "There is no file 'META-INF/container.xml' available"; | |
return console.warn(n), | |
Promise.reject(n) | |
} | |
return t.extract() | |
}(e).then((function() { | |
var n, r, i; | |
t.rootFile || (t.rootFile = (n = e.getFile("META-INF/container.xml"), | |
r = n && n.getFileContentAsDOM(), | |
(i = r && r.querySelector('rootfile[media-type="application/oebps-package+xml"]')) ? i.getAttribute("full-path") : (console.error("Could not find root file reference in ePub container file"), | |
null))); | |
var o = t.rootFile | |
, s = o && e.getFile(o); | |
return s ? (t.rootFolder = function(e) { | |
if (!e) | |
return null; | |
var t = e.lastIndexOf("\\"); | |
-1 === t && (t = e.lastIndexOf("/")); | |
var n = e.substring(0, t); | |
return n && (n += "/"), | |
n | |
}(o), | |
s.extract().then(()=>s.getFileContentAsDOM())) : Promise.reject("Root file '" + o + "' not found") | |
} | |
)) | |
} | |
function Tn(e, t, n, r) { | |
var i = e && (e.getAttribute("src") || e.getAttribute("href")); | |
if (i) { | |
var o = i.split("#"); | |
t.src = n + f(o[0]), | |
t.srcAnchor = o[1], | |
r && r.push(t) | |
} | |
} | |
function Pn(e, t, n) { | |
var r = t.querySelectorAll("nav") | |
, i = Array.prototype.filter.call(r, (function(e) { | |
return "toc" === e.getAttribute("epub:type") | |
} | |
))[0]; | |
return i ? function e(t, n, r, i, o) { | |
if (!n) | |
return null; | |
function s(e, n, r) { | |
const o = { | |
label: e ? e.textContent.trim() : "", | |
depth: n | |
}; | |
return r && (o.subNodes = []), | |
Tn(e, o, t, i), | |
o | |
} | |
const a = s(r, o, n.children.length > 0); | |
return Array.prototype.forEach.call(n.children, (function(n) { | |
var r = n.querySelector("li > a, li > span") | |
, u = n.querySelector("li > ol"); | |
u ? a.subNodes.push(e(t, u, r, i, o + 1)) : r && a.subNodes.push(s(r, o + 1)) | |
} | |
)), | |
a | |
}(e, i.querySelector("nav > ol"), i.querySelector("nav > h1, nav > h2, nav > h3"), n, 0) : null | |
} | |
function Ln(e, t, n) { | |
var r = t.split("#"); | |
return { | |
label: e, | |
fileName: r[0], | |
anchorID: r[1], | |
pageNum: n | |
} | |
} | |
function Nn(e, t) { | |
var n = 0; | |
return e.forEach(e=>{ | |
e.fileName = h(e.fileName, t.rootFolder), | |
e.fileIndex = t.spineIndex[e.fileName], | |
n = Math.max(n, e.pageNum) | |
} | |
), | |
t.toc.numPagesTotal = n, | |
e | |
} | |
function Bn() { | |
for (var e = 0; e < arguments.length; e++) { | |
var t = parseInt(arguments[e], 10); | |
if (!isNaN(t)) | |
return t | |
} | |
} | |
class Dn { | |
constructor(e) { | |
this.ePub = e, | |
this.info = {}, | |
this._parsePackageInfo = this._parsePackageInfo.bind(this), | |
this._parseEncryptionInfo = this._parseEncryptionInfo.bind(this), | |
this._getToC = this._getToC.bind(this), | |
this._parseToC = this._parseToC.bind(this), | |
this._parsePageList = this._parsePageList.bind(this), | |
this._getPageMap = this._getPageMap.bind(this) | |
} | |
setEPub(e) { | |
this.ePub = e, | |
this.info = {} | |
} | |
parseEPub() { | |
return Rn(this.ePub, this.info).then(this._parsePackageInfo).then(this._parseEncryptionInfo) | |
} | |
getPackageInfo() { | |
return Rn(this.ePub, this.info) | |
} | |
getEPubInfo() { | |
return this.info || {} | |
} | |
clearData() { | |
this.ePub = null, | |
this.info = null | |
} | |
_parsePackageInfo(e) { | |
var t = e.querySelector("package").getAttribute("version") | |
, n = this.info; | |
n.version = t && parseFloat(t, 10) || 2, | |
n.metadata = {}; | |
var r = e.querySelectorAll("package > metadata > *"); | |
Array.prototype.forEach.call(r, (function(e) { | |
var t = e.nodeName; | |
"meta" === t && (t = e.getAttribute("property") || e.getAttribute("name")), | |
"dc:identifier" === t && /^urn:uuid/i.exec(n.metadata[t]) || (n.metadata[t] = e.textContent || e.getAttribute("content")) | |
} | |
)); | |
var i = e.querySelectorAll("package > manifest > item"); | |
n.manifest = Array.prototype.map.call(i, (function(e) { | |
return { | |
id: e.getAttribute("id"), | |
href: n.rootFolder + e.getAttribute("href"), | |
"media-type": e.getAttribute("media-type"), | |
properties: e.getAttribute("properties") | |
} | |
} | |
)), | |
n.spine = [], | |
n.spineIndex = {}; | |
var o = e.querySelectorAll("package > spine > itemref"); | |
n.spine = Array.prototype.map.call(o, (function(t, r) { | |
var i = t.getAttribute("idref") || "" | |
, o = t.getAttribute("properties") | |
, s = e.querySelector("package > manifest > item[id='" + i.replace(/'/g, "\\'") + "']"); | |
s || (console.warn('No manifest item found for spine entry "' + i + '"'), | |
s = In); | |
var a = n.rootFolder + f(s.getAttribute("href")); | |
return n.spineIndex[a] = r, | |
{ | |
idref: i, | |
href: a, | |
linear: "no" !== t.getAttribute("linear"), | |
"media-overlay": s.getAttribute("media-overlay"), | |
properties: o && o.split(" ") | |
} | |
} | |
)); | |
var s = e.querySelectorAll("package > guide > reference"); | |
s && s.length > 0 && (n.guide = Array.prototype.map.call(s, (function(e) { | |
return { | |
type: e.getAttribute("type"), | |
title: e.getAttribute("title"), | |
href: e.getAttribute("href") | |
} | |
} | |
))); | |
var a = (o = e.querySelector("package > spine")) && o.getAttribute("toc") | |
, u = n.version >= 3 && e.querySelector("package > manifest > item[properties=nav]") || a && e.querySelector('package > manifest > item[id="' + a + '"]'); | |
if (u) { | |
var l = n.rootFolder + u.getAttribute("href") | |
, c = this.ePub.getFile(l); | |
return n.tocFile = l, | |
this._getToC(c) | |
} | |
return n.toc = {}, | |
Promise.resolve(n) | |
} | |
_parseEncryptionInfo() { | |
var e = this.info | |
, t = this.ePub.getFile("META-INF/encryption.xml"); | |
return t ? (e.encryption = {}, | |
t.extract().then((function() { | |
var n = t.getFileContentAsDOM().querySelectorAll("encryption > *"); | |
return Array.prototype.forEach.call(n, (function(t) { | |
var n = t.querySelector("[URI]") | |
, r = t.querySelector("[Algorithm]"); | |
n && r && (e.encryption[n.getAttribute("URI")] = r.getAttribute("Algorithm")) | |
} | |
)), | |
e | |
} | |
))) : Promise.resolve(e) | |
} | |
_getToC(e) { | |
return e ? e.extract().then(()=>this._parseToC(e)) : Promise.reject("No ToC file '" + this.info.tocFile + "' available") | |
} | |
_parseToC(e) { | |
var t = this.info | |
, n = e.getFileContentAsDOM(); | |
if (!n) | |
return Promise.reject("Could not parse ToC file '" + t.tocFile + "'"); | |
var r = t.tocFile.match(/.*\//) | |
, i = r && r[0] || t.rootFolder | |
, o = n.querySelector("docTitle, title") | |
, s = [] | |
, a = null; | |
if (t.version >= 3 && (a = Pn(i, n, s)), | |
!a) { | |
var u = n.querySelector("navMap"); | |
a = u && function e(t, n, r, i) { | |
if (!n) | |
return null; | |
var o = { | |
depth: i | |
}; | |
Array.prototype.forEach.call(n.attributes, (function(e) { | |
o[e.name] = e.value | |
} | |
)), | |
Array.prototype.forEach.call(n.childNodes, (function(n) { | |
var s = n.nodeName.replace(/^ncx:/i, ""); | |
"navPoint" === s ? (o.subNodes = o.subNodes || [], | |
o.subNodes.push(e(t, n, r, i + 1))) : "navLabel" === s ? o.label = n.textContent.trim() : "content" === s && Tn(n, o, t) | |
} | |
)); | |
var s = parseInt(o.playOrder, 10); | |
return !isNaN(s) && s >= 0 && (r[s] ? (console.info("ToC item for playOrder", s, "already defined -> appending"), | |
r.push(o)) : r[s] = o), | |
o | |
}(i, u, s, 0) | |
} | |
return 0 === s.length && console.warn("No ToC by playorder available"), | |
t.toc = { | |
docTitle: o && o.textContent.trim() || t.metadata["dc:title"], | |
toc: a, | |
tocByPlayOrder: s | |
}, | |
this._parsePageList(n) | |
} | |
_parsePageList(e) { | |
var t = this.info | |
, n = function(e) { | |
var t = e.querySelectorAll("nav"); | |
return Array.prototype.filter.call(t, (function(e) { | |
return "page-list" === e.getAttribute("epub:type") | |
} | |
))[0] | |
}(e); | |
return n ? (t.toc.pageList = Nn(function(e) { | |
if (!e) | |
return null; | |
var t = 0; | |
return Array.prototype.map.call(e.querySelectorAll("li > a"), (function(e) { | |
var n = e.textContent.trim(); | |
return t = Bn(n, t + 1), | |
Ln(n, e.getAttribute("href"), t) | |
} | |
)) | |
}(n), t), | |
Promise.resolve(t)) : (n = e.querySelector("pageList")) ? (t.toc.pageList = Nn(function(e) { | |
var t = e.querySelectorAll("pageTarget") | |
, n = 0; | |
return Array.prototype.map.call(t, (function(e) { | |
var t = e.querySelector("text") | |
, r = e.querySelector("content") | |
, i = e.getAttribute("value") | |
, o = t && t.textContent.trim() || i; | |
return n = Bn(o, i, n + 1), | |
Ln(o, r && r.getAttribute("src"), n) | |
} | |
)) | |
}(n), t), | |
Promise.resolve(t)) : this._getPageMap().then(e=>(t.toc.pageList = e && Nn(function(e) { | |
var t = e.querySelectorAll("page") | |
, n = 0; | |
return Array.prototype.map.call(t, (function(e) { | |
var t = e.getAttribute("name"); | |
return Ln(t, e.getAttribute("href"), n = Bn(t, n + 1)) | |
} | |
)) | |
}(e), t), | |
t)) | |
} | |
_getPageMap() { | |
var e = this.info.manifest.filter(e=>"application/oebps-page-map+xml" === e["media-type"])[0] | |
, t = e && e.href | |
, n = this.ePub.getFile(t); | |
return n ? n.extract().then(()=>n.getFileContentAsDOM()) : Promise.resolve(null) | |
} | |
} | |
class Un { | |
constructor(e) { | |
this.initSpine(e) | |
} | |
initSpine(e) { | |
for (this.spine = e instanceof Array ? e : []; void 0 === this.spine[0] && this.spine.length > 0; ) | |
this.spine.shift(); | |
this.currSectionIndex = null, | |
this.lastSectionIndex = this.spine.length - 1 | |
} | |
clearData() { | |
this.spine = [], | |
this.currSectionIndex = null, | |
this.lastSectionIndex = null | |
} | |
getSectionByIndex(e, t) { | |
t && (e = Math.max(0, Math.min(this.currSectionIndex + e, this.lastSectionIndex))); | |
var n = this.spine[e]; | |
return n ? n.href : null | |
} | |
getCurrentSpineItem() { | |
return this.spine[this.currSectionIndex] || null | |
} | |
getCurrentSection() { | |
return this.getSectionByIndex(this.currSectionIndex) | |
} | |
getSectionByRelativeReference(e) { | |
switch (e) { | |
case "first": | |
return this.getSectionByIndex(0); | |
case "last": | |
return this.getSectionByIndex(this.lastSectionIndex); | |
case "next": | |
return this.getSectionByIndex(1, !0); | |
case "prev": | |
case "previous": | |
return this.getSectionByIndex(-1, !0); | |
default: | |
var t = parseInt(e, 10); | |
return isNaN(t) ? this.getSectionByIndex(this.currSectionIndex) : this.getSectionByIndex(t, !0) | |
} | |
} | |
setSectionByName(e) { | |
var t = this._getSpineIndexFor(e); | |
return -1 === t ? (console.warn('Could not set section by name "' + e + '"'), | |
!1) : (this.currSectionIndex = t, | |
!0) | |
} | |
isSectionInSpine(e) { | |
return this._getSpineIndexFor(e) > -1 | |
} | |
isFirstSection() { | |
return 0 === this.currSectionIndex | |
} | |
isLastSection() { | |
return this.currSectionIndex === this.lastSectionIndex | |
} | |
_getSpineIndexFor(e) { | |
return this.spine.findIndex(t=>t.href === e) | |
} | |
} | |
var Fn = n("./musketeer/modules/tolino-shared/services/Crypto.js"); | |
const Hn = ()=>Promise.resolve() | |
, zn = ()=>Promise.resolve() | |
, qn = Je.a.channel("reader") | |
, Wn = /\.htm$|\.html$|\.xhtml$|\.xml$|\.svg$/i; | |
function Kn(e, t) { | |
var n; | |
return e && (console.warn(e), | |
n = t ? { | |
message: e, | |
reason: t | |
} : e), | |
Promise.reject(n) | |
} | |
function Gn(e, t) { | |
var n = new RegExp(t + "\\s*=\\s*([0-9.]+)","i") | |
, r = e.match(n); | |
return r && parseFloat(r[1], 10) || 0 | |
} | |
class Vn { | |
constructor(e, t) { | |
this.ePubParser = new Dn, | |
this.sectionNav = new Un, | |
this.crypto = new Fn.a, | |
this.cryptInfo = null, | |
this.ePubArchive = null, | |
this.contentFileMap = { | |
fileInfo: null, | |
fileOrder: [] | |
}, | |
this.sectionLabels = Object.create(null), | |
this.deliverableId = null, | |
this.viewPortBySection = Object.create(null), | |
e && this.init(e, t) | |
} | |
init(e, t) { | |
return this.ePubArchive = new Cn(e), | |
this.ePubArchive.files ? (this.deliverableId = t && t.id, | |
this.deliverableId && t.clientData && t.clientData.crypto ? this.cryptInfo = t.clientData.crypto : this.crypto = null, | |
this.viewPortBySection = Object.create(null), | |
this.deliverableId && "EDATA" === t.type && !t.cover && Hn(e).then(e=>{ | |
zn(e, this.deliverableId) | |
} | |
, (function() {} | |
)), | |
this.ePubParser.setEPub(this.ePubArchive), | |
this.ePubParser.parseEPub().then(e=>this._processEPubMetaData(t, e), e=>Kn(e, "PARSER_ERROR"))) : Kn("No files in ePub archive found", "PARSER_ERROR") | |
} | |
clearData() { | |
this.sectionNav.clearData(), | |
this.ePubArchive && (this.ePubArchive.destroy(), | |
this.ePubArchive = null), | |
this.ePubParser.clearData(), | |
this.contentFileMap.fileInfo = null, | |
this.contentFileMap.fileOrder.length = 0, | |
this.sectionLabels = Object.create(null), | |
this.cryptInfo = null, | |
this.viewPortBySection = Object.create(null) | |
} | |
getEPubInfo() { | |
return this.ePubParser && this.ePubParser.getEPubInfo() || {} | |
} | |
getFiles() { | |
return this.ePubArchive.getFiles() | |
} | |
getContentFileMap() { | |
return this.contentFileMap.fileInfo ? this.contentFileMap : this._calcContentFileMap() | |
} | |
getSectionLabel(e) { | |
return this.sectionLabels[e] || "" | |
} | |
getNameOfCurrentSection() { | |
return this.sectionNav.getSectionByRelativeReference("current") | |
} | |
getSectionNameByReference(e) { | |
return this.sectionNav.getSectionByRelativeReference(e) | |
} | |
getSectionNameByPercentage(e, t) { | |
e = Math.max(0, Math.min(e, 1)); | |
var n = this.contentFileMap; | |
if (t) { | |
var r = Math.round(e * (n.fileOrder.length - 1)); | |
return n.fileOrder[r] | |
} | |
var i = n ? Math.floor(n.totalSize * e) : 0; | |
return n.fileOrder.find(e=>{ | |
var t = n.fileInfo[e]; | |
return t.start <= i && i <= t.start + t.size | |
} | |
) | |
} | |
getRawSection(e) { | |
var t = this.sectionNav.getSectionByIndex(e); | |
return this._getParsedContent(t).then(e=>({ | |
name: t, | |
parsedContent: e | |
}), null) | |
} | |
getSectionByName(e, t) { | |
return e === this.sectionNav.getCurrentSection() ? Kn(`getSectionByName: "${e}" is already current section`) : this.sectionNav.setSectionByName(e) ? this.getSectionContent(e, t) : Kn(`getSectionByName: "${e}" not found`) | |
} | |
isSectionInSpine(e) { | |
return this.sectionNav.isSectionInSpine(e) | |
} | |
isFirstSection() { | |
return this.sectionNav.isFirstSection() | |
} | |
isLastSection() { | |
return this.sectionNav.isLastSection() | |
} | |
setCurrentSection(e) { | |
return this.sectionNav.setSectionByName(e) | |
} | |
setCryptInfo(e) { | |
this.cryptInfo = e | |
} | |
getMediaOverlay() { | |
var e = this.sectionNav.getCurrentSpineItem() | |
, t = e && e["media-overlay"]; | |
if (t) { | |
var n = this.getEPubInfo().manifest.find(e=>e.id === t) | |
, r = n && this.ePubArchive.getFile(n.href); | |
if (r) | |
return r.extract().then(()=>Promise.resolve(r.getFileContentAsDOM())) | |
} | |
return Promise.reject() | |
} | |
getViewport(e) { | |
return e in this.viewPortBySection ? Promise.resolve(this.viewPortBySection[e]) : this._getParsedContent(e).then(t=>{ | |
var n, r, i, o = t && t.querySelector('head > meta[name="viewport"]'); | |
return o && (r = Gn(n = o.getAttribute("content"), "width"), | |
i = Gn(n, "height")), | |
this.viewPortBySection[e] = r > 0 && i > 0 ? { | |
width: r, | |
height: i | |
} : null, | |
this.viewPortBySection[e] | |
} | |
) | |
} | |
getMimeType(e) { | |
e || (e = this.getNameOfCurrentSection()); | |
var t = this.getEPubInfo(); | |
return (t.manifest.find((function(t) { | |
return t.href === e | |
} | |
)) || {})["media-type"] || (t.version >= 3 ? "text/html" : "application/xhtml+xml") | |
} | |
scanHTMLTags(e) { | |
var t = [] | |
, n = []; | |
return this.getEPubInfo().spine.forEach((r,i)=>{ | |
t.push(this.getRawSection(i).then(t=>{ | |
var r = t.parsedContent && t.parsedContent.documentElement; | |
if (r) { | |
var i = r.querySelectorAll(e); | |
Array.prototype.forEach.call(i, e=>{ | |
n.push({ | |
name: t.name, | |
node: e.nodeName | |
}) | |
} | |
) | |
} | |
return Promise.resolve() | |
} | |
)) | |
} | |
), | |
Promise.all(t).then(()=>n) | |
} | |
isScripted(e) { | |
var t = this.getEPubInfo().manifest || [] | |
, n = /\bscripted\b/; | |
function r(e) { | |
return e && (e["media-type"].endsWith("javascript") || n.test(e.properties)) | |
} | |
return e ? r(t.find(t=>t.href === e)) : t.some(r) | |
} | |
_calcContentFileMap() { | |
var e = this.contentFileMap | |
, t = this.ePubParser && this.ePubParser.info.spine || [] | |
, n = 0 | |
, r = -1; | |
return e.fileInfo = {}, | |
e.fileOrder.length = 0, | |
t.forEach(t=>{ | |
var i = t.href | |
, o = this.ePubArchive.getFile(i); | |
if (o && Wn.test(i)) { | |
var s, a, u = e.fileInfo[i] = { | |
start: r + 1, | |
size: o.getUncompressedSize(), | |
index: e.fileOrder.length, | |
pageStart: n + 1, | |
pageCount: (s = o, | |
a = s.headers.isEncrypted ? 16 : 0, | |
Math.ceil((s.getCompressedSize() - a) / 1024)) | |
}; | |
r += u.size, | |
n += u.pageCount, | |
e.fileOrder.push(i) | |
} | |
} | |
), | |
e.totalSize = r + 1, | |
e.pagesTotal = n, | |
e | |
} | |
getSectionContent(e, t) { | |
return this.sectionNav.isSectionInSpine(e) ? this._getParsedContent(e).then(n=>{ | |
var r; | |
const i = (null === (r = n.doctype) || void 0 === r ? void 0 : r.name) || "html"; | |
return /^x?html?$/i.test(i) || console.warn('Section "%s": doctype is "%s", expected "(x)html"', e, i), | |
this.getViewport(e).then(r=>function(e, t) { | |
var n, r; | |
return console.assert("[object Window]" === Object.prototype.toString.call(t.window), "window object is provided"), | |
qt(e) ? ((n = new Ht(t)).addTask("SET_LANG_ATTRIBUTE"), | |
n.addTask("PREPROCESS_LINKS"), | |
a.hasSVGSupport(t.window) || n.addTask("CONVERT_SVG_IMAGES"), | |
n.addTask("EMBED_HTML_IMAGES"), | |
n.addTask("PREPROCESS_AUDIO_VIDEO"), | |
n.addTask("SPLIT_FONT_SHORTHAND"), | |
n.addTask("EMBED_SCRIPTS"), | |
n.addTask("PROCESS_STYLES"), | |
n.startProcessing(e)) : (r = e) && "image/svg+xml" === r.contentType ? (n = new Ht(t), | |
a.hasSVGSupport(t.window) || n.addTask("CONVERT_SVG_IMAGES"), | |
n.addTask("EMBED_HTML_IMAGES"), | |
n.startProcessing(e)) : Promise.reject("Invalid content type") | |
}(n, { | |
ePubInfo: this.getEPubInfo(), | |
files: this.ePubArchive.getFiles(), | |
root: e, | |
deliverableId: this.deliverableId, | |
language: this._getEPubLanguage(), | |
hasFixedLayout: !!r, | |
window: t | |
})) | |
} | |
, t=>Kn('Could not fetch content for section "' + e + '", ' + t, "PARSER_ERROR")) : Kn('section "' + e + '" not found in spine') | |
} | |
_getParsedContent(e) { | |
if (!this.ePubArchive) | |
return Kn("Empty ePub archive!", "PARSER_ERROR"); | |
var t = this.ePubArchive.getFile(e); | |
return t ? t.extract().then(()=>{ | |
var n; | |
return this.cryptInfo && this.cryptInfo.devKey && (this.crypto.setDeviceKey(this.cryptInfo.devKey), | |
n = this.crypto.decryptContent(this.cryptInfo.key, this.cryptInfo.vector, t.fileContent)), | |
t.getFileContentAsDOM(this.getMimeType(e), n) | |
} | |
) : Kn('File "' + e + "\" not present in publication's ZIP archive", "PARSER_ERROR") | |
} | |
_processEPubMetaData(e, t) { | |
var n = t && t.toc || {}; | |
this._calcContentFileMap(), | |
this._processSectionLabels(n.tocByPlayOrder), | |
t && this.sectionNav.initSpine(t.spine); | |
var r = { | |
parsedEPubInfo: t, | |
fileMap: this.contentFileMap, | |
deliverable: e | |
}; | |
return qn.publish("rx.ePub.metaData", r), | |
Promise.resolve(r) | |
} | |
_processSectionLabels(e) { | |
this.sectionLabels = Object.create(null), | |
e && e.forEach(e=>{ | |
e.src && e.label && !this.sectionLabels[e.src] && (this.sectionLabels[e.src] = e.label) | |
} | |
) | |
} | |
_getEPubLanguage() { | |
var e = this.getEPubInfo().metadata; | |
return e && e["dc:language"] | |
} | |
} | |
class Qn { | |
constructor() { | |
this.propertyStore = Object.create(null) | |
} | |
discard(e, t) { | |
var n = J.ruleType | |
, r = e && e.cssRules || [] | |
, i = this.propertyStore[t]; | |
i || (i = this.propertyStore[t] = []), | |
Array.prototype.forEach.call(r, e=>{ | |
const r = e.type === n.STYLE_RULE && e.style[t]; | |
r ? (i.push({ | |
rule: e, | |
name: t, | |
value: r, | |
prio: e.style.getPropertyPriority(t) | |
}), | |
e.style.setProperty(t, "", "")) : e.type === n.MEDIA_RULE && this.discard(e, t) | |
} | |
) | |
} | |
restore(e) { | |
var t = this.propertyStore[e]; | |
t && 0 !== t.length && (t.forEach(t=>{ | |
t.name === e && t.rule && t.rule.style.setProperty(e, t.value, t.prio) | |
} | |
), | |
t.length = 0) | |
} | |
clear() { | |
for (var e in this.propertyStore) | |
this.propertyStore[e].length = 0 | |
} | |
} | |
const Yn = _.a.READER.FONT; | |
function Zn(e) { | |
return e && e.startsWith("font:meta:") | |
} | |
function $n(e, t) { | |
return e === t || Number(e) === Number(t) || !e && ("normal" === t || 400 === Number(t)) || !t && ("normal" === e || 400 === Number(e)) | |
} | |
class Xn { | |
constructor(e, t) { | |
console.assert(e && "function" == typeof e.getItem && "function" == typeof e.removeItem && "function" == typeof e.getAllKeys, "Async storage is provided"), | |
this.contentDoc = t, | |
this.asyncStore = e, | |
this._addUserDefinedFont = this._addUserDefinedFont.bind(this) | |
} | |
setContentDocument(e) { | |
this.contentDoc = e | |
} | |
getFontIdentifier(e) { | |
return e.fontName || B(e.fileName).family | |
} | |
setPublicationFonts(e) { | |
const t = this._getStyleSheet(Yn.PUBLICATION_SHEET_ID, !0); | |
t && t.sheet && (t.sheet.disabled = !e) | |
} | |
addCustomFont(e) { | |
var t = Yn.CUSTOM[e]; | |
if (t) { | |
var n = this._getStyleSheet(Yn.CUSTOM_SHEET_ID).sheet | |
, r = _.a.READER.FONT.BASE_PATH_FONTS; | |
t.variants.forEach((function(e) { | |
var i = r + e.src | |
, o = `@font-face { font-family: "${t.id}";src: url(${i}.woff) format("woff"), url(${i}.ttf) format("truetype"), url(${i}.otf) format("opentype");font-style: ${e.style}; font-weight: ${e.weight};}`; | |
n.insertRule(o, n.cssRules.length) | |
} | |
)) | |
} else if (this.asyncStore) | |
return this.asyncStore.getAllKeys().then(this._fetchUserDefinedFont.bind(this, e)).then(this._addUserDefinedFont); | |
return Promise.resolve() | |
} | |
removeAllCustomFonts() { | |
var e = this._getStyleSheet(Yn.CUSTOM_SHEET_ID, !0); | |
if (e) | |
for (var t = e.sheet.cssRules.length - 1; t >= 0; t--) | |
e.sheet.deleteRule(t) | |
} | |
removeUserDefinedFont(e) { | |
return this.asyncStore ? this.asyncStore.getAllKeys().then(t=>{ | |
var n = []; | |
return t.filter(Zn).forEach(t=>{ | |
n.push(this.asyncStore.getItem(t).then(n=>(n = JSON.parse(n), | |
this.getFontIdentifier(n) !== e && e ? Promise.resolve() : this.asyncStore.removeItem(t).then(()=>this.asyncStore.removeItem("font:file:" + n.fileName))))) | |
} | |
), | |
Promise.all(n) | |
} | |
) : Promise.resolve() | |
} | |
_getStyleSheet(e, t) { | |
var n, r, i = this.contentDoc; | |
return i ? ((n = i.getElementById(e)) || t || !(r = i.querySelector("head")) || ((n = i.createElement("style")).type = "text/css", | |
n.id = e, | |
r.appendChild(n)), | |
n) : null | |
} | |
_addUserDefinedFont(e) { | |
var t = this._getStyleSheet(Yn.CUSTOM_SHEET_ID); | |
if (t && e && 0 !== e.length) { | |
var n = this.getFontIdentifier(e[0].metaData) | |
, r = t.sheet.cssRules; | |
e.forEach(e=>{ | |
var i = e.metaData.subFamily | |
, o = e.metaData.fileName | |
, s = o.split(".").pop().toLowerCase() | |
, a = _.a.MIME_TYPES[s] | |
, u = function(e, t) { | |
var n = x.exec(e) | |
, r = n && S[n[0]]; | |
return j[r] || B(t).weightNum | |
}(i, o) | |
, l = function(e, t) { | |
var n = O.exec(e); | |
return n && E[n[0]] || B(t).style | |
}(i, o); | |
if (!function(e, t, n, r) { | |
var i = new RegExp("^([\"']?)" + t + "\\1$"); | |
return Array.prototype.some.call(e, e=>e.type === e.FONT_FACE_RULE && i.test(e.style["font-family"]) && $n(n, e.style["font-weight"]) && $n(r, e.style["font-style"])) | |
}(r, n, u, l)) { | |
var c = v.createURL("font:" + o, e.file, a) | |
, d = "@font-face { font-family: '" + n + "'; src: url(" + c + ");font-style: " + l + ";font-weight: " + u + "; }"; | |
t.sheet.insertRule(d, r.length) | |
} | |
} | |
) | |
} | |
} | |
_fetchUserDefinedFont(e, t) { | |
var n = []; | |
return this.asyncStore ? (t.filter(Zn).forEach(t=>{ | |
n.push(this.asyncStore.getItem(t).then(t=>(t = JSON.parse(t), | |
this.getFontIdentifier(t) === e ? this.asyncStore.getItem("font:file:" + t.fileName).then(e=>Promise.resolve({ | |
metaData: t, | |
file: e | |
})) : Promise.resolve(null)))) | |
} | |
), | |
Promise.all(n).then(e=>e.filter(e=>null !== e))) : Promise.resolve(null) | |
} | |
} | |
function Jn(e) { | |
for (var t = 0; e; t++) | |
e = e.previousSibling; | |
return t | |
} | |
function er(e, t) { | |
var n = e && e.firstChild; | |
if (!n) | |
return ":" + Yt.lengthInUTF8Bytes(e.textContent.substr(0, t)); | |
for (var r = 1; n; r++) { | |
if (a.isElementOrTextNode(n)) { | |
var i = n.textContent ? n.textContent.length : 0; | |
if (i > t) | |
break; | |
t -= i | |
} | |
n = n.nextSibling | |
} | |
return "/" + r + (n ? er(n, t) : "") | |
} | |
function tr(e, t, n) { | |
return e + "#point(/1/" + Jn(t) + er(t, n) + ")" | |
} | |
class nr { | |
constructor(e) { | |
console.assert(e, "contentProvider is defined"), | |
this.contentProvider = e, | |
this.searchResults = [], | |
this.reset() | |
} | |
reset() { | |
this.searchTerm = "", | |
this.searchResults.length = 0, | |
this.index = 0 | |
} | |
search(e) { | |
if (!e || e.length < _.a.MISC.SEARCH_TERM_MIN_LENGTH) | |
return Promise.reject(new Error("Search term length violation")); | |
var t = [] | |
, n = e.replace(/[-*+?.()[\]{}\\^$|#]/g, "\\$&"); | |
n = n.replace(/ /g, "\\s"); | |
var r = this.contentProvider.getEPubInfo().spine || [] | |
, i = this._searchInSection.bind(this, new RegExp(n,"gi")); | |
return r.forEach((e,n)=>t.push(this.contentProvider.getRawSection(n).then(i))), | |
this.searchTerm = e, | |
Promise.all(t).then(e=>this.searchResults = Array.prototype.concat.apply([], e)) | |
} | |
getIndexByPosition(e, t) { | |
var n = this._getSpineIndexForFilename(e.fileName) | |
, r = this.searchResults.length | |
, i = t.querySelector("body") | |
, o = [1, Jn(i)]; | |
const s = e=>parseInt(e, 10); | |
for (var a = 0; a < r; a++) { | |
var u = this.searchResults[a]; | |
if (u.spineIndex > n) | |
return a; | |
if (u.spineIndex === n) { | |
var l = er(i, u.index).split(":") | |
, c = { | |
childSequence: o.concat(l[0].substr(1).split("/").map(s)), | |
offset: s(l[1]) | |
}; | |
if (ln.compareLocalPosition(c, e) >= 0) | |
return a | |
} | |
} | |
return 0 | |
} | |
getByIndex(e) { | |
var t = this.contentProvider.getEPubInfo() | |
, n = this.searchResults[e] || {}; | |
return this.index = e, | |
{ | |
fileName: t.spine[n.spineIndex].href, | |
index: n.index, | |
text: this.searchTerm | |
} | |
} | |
setRMSDKPosition(e, t) { | |
var n = t.querySelector("body") | |
, r = e.fileName | |
, i = e.index + e.text.length; | |
e.rmsdkPosition = tr(r, n, e.index), | |
e.endPosition = tr(r, n, i) | |
} | |
_getSpineIndexForFilename(e) { | |
return this.contentProvider.getEPubInfo().spineIndex[e] || 0 | |
} | |
_searchInSection(e, t) { | |
for (var n, r = t.parsedContent, i = r && r.documentElement, o = i && i.querySelector("body"), s = o && o.textContent || "", a = this._getSpineIndexForFilename(t.name), u = []; null !== (n = e.exec(s)); ) | |
u.push({ | |
index: n.index, | |
spineIndex: a | |
}); | |
return Promise.resolve(u) | |
} | |
} | |
var rr = n("./musketeer/modules/tolino-shared/services/KeyHandler.js"); | |
var ir = class { | |
static isValidLanguage(e) { | |
let t = Boolean(_.a.LOCALIZATION.VALID_LANGUAGES.indexOf(e) > -1); | |
return t || console.warn('[Localization] "' + e + '" it not a valid language! Valid languages are "' + _.a.LOCALIZATION.VALID_LANGUAGES.join('", "') + '".'), | |
t | |
} | |
static getDefaultLanguage() { | |
let e = _.a.LOCALIZATION.DEFAULT_LANGUAGE; | |
if (!e) | |
throw new Error("[Localization] No default language has been defined! Set GLOBALS.LOCALIZATION.DEFAULT_LANGUAGE."); | |
return e | |
} | |
static getDefaultLanguageForReseller(e) { | |
let t = _.a.LOCALIZATION.RESELLER_DEFAULT_LANGUAGE[e]; | |
return t || (console.warn('[Localization] No default language for reseller "' + e + '"! Falling back to "' + this.getDefaultLanguage() + '".'), | |
t = this.getDefaultLanguage()), | |
t | |
} | |
static getNormalizedLang(e, t) { | |
return this.isValidLanguage(e) || (e = this.getDefaultLanguageForReseller(t), | |
this.isValidLanguage(e) || (e = this.getDefaultLanguage())), | |
e | |
} | |
} | |
; | |
Je.a.channel("reader"); | |
n("./musketeer/modules/tolino-shared/services/Metadata.js"); | |
class or { | |
constructor(e) { | |
this.init(e) | |
} | |
init(e) { | |
this.pagePartitions = e instanceof Array ? e : [], | |
console.assert(this.pagePartitions.every((e,t,n)=>e.offset >= 0 && (0 === t || n[t - 1].offset < e.offset)), "pagePartitions are valid"), | |
this.currentIndex = 0 | |
} | |
getPageByIndex(e) { | |
return this.pagePartitions[e] ? (this.currentIndex = e, | |
this.pagePartitions[e]) : null | |
} | |
identifyPage(e) { | |
for (var t = (e = Math.round(e)) > 0 ? this.pagePartitions.length - 1 : 0, n = 0; n < t; n++) | |
if (this.pagePartitions[n].offset <= e && e < this.pagePartitions[n + 1].offset) | |
return n; | |
return n > 0 ? t : 0 | |
} | |
getCurrentPageNo() { | |
return this.currentIndex | |
} | |
getNumberOfPages() { | |
return this.pagePartitions.length | |
} | |
getFirstPage() { | |
return this.getPageByIndex(0) | |
} | |
getNextPage() { | |
return this.getPageByIndex(this.currentIndex + 1) | |
} | |
getPreviousPage() { | |
return this.getPageByIndex(this.currentIndex - 1) | |
} | |
getPageByReference(e) { | |
switch (e) { | |
case "first": | |
return this.getPageByIndex(0); | |
case "last": | |
return this.getPageByIndex(this.pagePartitions.length - 1); | |
case "next": | |
return this.getPageByIndex(this.currentIndex + 1); | |
case "prev": | |
case "previous": | |
return this.getPageByIndex(this.currentIndex - 1); | |
case "current": | |
return this.getPageByIndex(this.currentIndex); | |
default: | |
return this.getPageByIndex(e || 0) | |
} | |
} | |
getPageByOffset(e) { | |
return this.getPageByIndex(this.identifyPage(e)) | |
} | |
getMaxOffset() { | |
var e = this.pagePartitions[this.pagePartitions.length - 1]; | |
return e && e.offset || 0 | |
} | |
setCurrentPageByIndex(e) { | |
0 <= e && e < this.pagePartitions.length && (this.currentIndex = e) | |
} | |
isFirstPage() { | |
return 0 === this.currentIndex | |
} | |
isLastPage() { | |
return this.currentIndex === this.pagePartitions.length - 1 | |
} | |
} | |
const sr = { | |
audio: !0, | |
canvas: !0, | |
embed: !0, | |
iframe: !0, | |
img: !0, | |
picture: !0, | |
math: !0, | |
object: !0, | |
svg: !0, | |
video: !0, | |
h1: !0, | |
h2: !0, | |
h3: !0, | |
h4: !0, | |
h5: !0, | |
h6: !0, | |
header: !0, | |
hgroup: !0 | |
} | |
, ar = [1, 2 / 3, .5, 1 / 3, 0]; | |
function ur(e) { | |
var t = e.ownerDocument.defaultView.getComputedStyle; | |
return Array.prototype.every.call(e.children, e=>t(e).display.startsWith("inline")) | |
} | |
class lr { | |
constructor() { | |
this.pagePartitions = [], | |
this.offsetChildren = [] | |
} | |
getPagingColumnGap(e) { | |
return e && 0 !== e.offsetWidth ? Math.max(0, e.parentNode.offsetWidth - e.offsetWidth) : 64 | |
} | |
calculatePagingParams(e) { | |
var t = this.getPagingColumnGap(e) | |
, n = e.offsetWidth + t | |
, r = this._getSectionEndOffset(e) | |
, i = Math.floor(r / n); | |
return 0 === n && console.warn("Calculate paging parameter: column width is 0"), | |
isNaN(i) && (i = 0), | |
{ | |
columnCount: i + 1, | |
columnGap: t, | |
columnWidth: n | |
} | |
} | |
calcPagingColumns(e) { | |
if (this.pagePartitions.length = 0, | |
e) | |
for (var t = this.calculatePagingParams(e), n = 0; n < t.columnCount; n++) | |
this.pagePartitions.push({ | |
offset: Math.round(n * t.columnWidth) | |
}); | |
return this.pagePartitions | |
} | |
calcPagePartitions(e, t, n) { | |
(this.pagePartitions.length = 0, | |
e && t > 0) && (this.readerTop = n || 0, | |
this.topOfCurrPartition = n || 0, | |
this.viewportHeight = t, | |
this.viewportBottom = this.readerTop + t, | |
this._collectOffsetChildren(e), | |
this.offsetChildren.length > 0 ? (this._generatePagePartitions(), | |
this.pagePartitions[this.pagePartitions.length - 1].height = t, | |
this.offsetChildren.length = 0) : console.warn("Content node doesn't contain any offsetchildren - page partitioning canceled")); | |
return this.pagePartitions | |
} | |
_getSectionEndOffset(e) { | |
var t = e.getElementsByClassName(_.a.READER.SPACER_CLASSNAME)[0]; | |
return t ? t.getBoundingClientRect().left - t.parentNode.getBoundingClientRect().left : (console.warn("getSectionEndOffset: section end marker not found"), | |
0) | |
} | |
_isNodeDivisible(e, t, n, r) { | |
if (t > this.viewportHeight || "img" === r || 1 === n || 0 === n) | |
return !0; | |
if (0 === e.childNodes.length || null === n || sr[r]) | |
return !1; | |
for (var i = e.children.length - 1; i >= 0; i--) { | |
var o = e.children[i]; | |
if (r = o.nodeName.toLowerCase(), | |
sr[r] && t < o.getBoundingClientRect().height + n) | |
return !1 | |
} | |
return !0 | |
} | |
_calcImageSplit(e, t) { | |
if (e < .25 * this.viewportHeight) | |
return 0; | |
var n = e / t | |
, r = ar.findIndex(e=>e <= n); | |
return Math.floor(t * (r >= 0 ? ar[r] : n)) | |
} | |
_calcTextNodeSplit(e) { | |
if (!a.isTextNode(e)) | |
return 0; | |
var t = e.ownerDocument.createRange(); | |
t.selectNode(e); | |
var n = t.getClientRects() | |
, r = Array.prototype.findIndex.call(n, e=>e.bottom > this.viewportBottom); | |
return r > 0 ? n[r - 1].bottom - n[0].top : 0 | |
} | |
_calcHeightForNode(e, t) { | |
var n, r, i, o = 0, s = e.childNodes ? e.childNodes.length : 0; | |
if (0 === s) | |
return 0; | |
for (var u = 0; u < s; u++) | |
if (r = e.childNodes[u], | |
(i = a.getBoundingBox(r)) && 0 !== i.height) { | |
if (i.top > this.viewportBottom) | |
return null; | |
if (i.top >= t) | |
return Math.round(Math.min(i.top - this.topOfCurrPartition, this.viewportBottom)); | |
if (i.bottom >= t && i.bottom <= this.viewportBottom) | |
return Math.round(i.bottom - this.topOfCurrPartition); | |
if (i.bottom > this.viewportBottom) { | |
if (a.isTextNode(r)) | |
return o = this._calcTextNodeSplit(r), | |
Math.round(i.top - this.topOfCurrPartition + o); | |
if (a.isElementNode(r) && (n = this._calcHeightForNode(r, t))) | |
return n | |
} | |
} | |
return null | |
} | |
_calcPartitionHeight(e, t) { | |
var n, r, i = a.getComputedStyleValue(e, "lineHeight"), o = e.nodeName.toLowerCase(), s = t.top - this.topOfCurrPartition, u = 0; | |
if (!this._isNodeDivisible(e, t.height, i, o)) | |
return Math.round(s >= 0 ? s : this.viewportHeight); | |
if ("img" === o || i <= 1) { | |
s >= 0 ? (u = a.getComputedStyleValue(e, "paddingTop") + a.getComputedStyleValue(e, "borderTopWidth"), | |
n = this.viewportBottom - t.top - u) : (s = 0, | |
n = this.viewportHeight); | |
var l = this._calcImageSplit(n, t.height); | |
return Math.round(t.top - this.topOfCurrPartition + (l > 0 ? l + u : 0)) | |
} | |
return r = this.viewportBottom - 1 * i, | |
this._calcHeightForNode(e, r) || this.viewportHeight | |
} | |
_addPartitions(e, t, n) { | |
var r; | |
do { | |
n > 0 ? (r = n, | |
n = 0) : t.bottom > this.viewportBottom ? r = this._calcPartitionHeight(e, t) : t.bottom > this.topOfCurrPartition ? r = Math.round(t.bottom - this.topOfCurrPartition) : (console.info("addPartitions: splitnode %o (top: %dpx, h: %dpx) is outside viewport!", e, t.top, t.height), | |
r = this.viewportHeight), | |
(r <= 0 || r > this.viewportHeight) && (console.info("Invalid PartitionHeight: %spx set to %spx at page %s", r, this.viewportHeight, this.pagePartitions.length), | |
r = this.viewportHeight), | |
this.pagePartitions.push({ | |
offset: this.topOfCurrPartition - this.readerTop, | |
height: r | |
}), | |
this.topOfCurrPartition += r, | |
this.viewportBottom = this.topOfCurrPartition + this.viewportHeight | |
} while (t.bottom > this.viewportBottom) | |
} | |
_generatePagePartitions() { | |
var e, t, n, r, i, o, s, a = this.offsetChildren.length - 1, u = [], l = 0, c = 0; | |
for (r = 0; r <= a; r++) | |
if (e = this.offsetChildren[r].node, | |
!((t = this.offsetChildren[r].bbox).bottom <= this.viewportBottom && (t.bottom > c && (c = t.bottom, | |
l = r), | |
r < a) || t.top <= this.viewportBottom && (ur(e) && u.push({ | |
index: r, | |
bbox: t | |
}), | |
r < a))) { | |
if (0 === u.length) | |
o = null, | |
r = l; | |
else { | |
for (o = this.viewportHeight, | |
i = u.length - 1; i >= 0; i--) | |
l = u[i].index, | |
t = u[i].bbox, | |
e = this.offsetChildren[l].node, | |
(s = this._calcPartitionHeight(e, t)) < o && (o = s, | |
r = l); | |
u.length = 0 | |
} | |
n = this.offsetChildren[r], | |
this._addPartitions(n.node, n.bbox, o) | |
} | |
} | |
_collectOffsetChildren(e) { | |
Array.prototype.forEach.call(e.children, e=>{ | |
e.offsetParent && (e.offsetHeight > 0 && this._addNodeToOffsetChildren(e), | |
e.childElementCount > 0 && this._collectOffsetChildren(e)) | |
} | |
) | |
} | |
_addNodeToOffsetChildren(e) { | |
var t = this.offsetChildren.length | |
, n = Object.create(null); | |
if (n.node = e, | |
n.bbox = e.getBoundingClientRect(), | |
0 !== t) { | |
for (var r = n.bbox.top; t > 0 && r < this.offsetChildren[t - 1].bbox.top; ) | |
t--; | |
this.offsetChildren.splice(t, 0, n) | |
} else | |
this.offsetChildren[0] = n | |
} | |
} | |
n("./musketeer/modules/tolino-shared/services/Reseller.js"); | |
const cr = /^Cannot read property .* of undefined$|^undefined is not an object/; | |
function dr(e, t, n) { | |
e && e.classList && /^(click|mouseup|mousedown|touchend)$/.test(t) && a.setClass(e, "is-interactive-elem", n) | |
} | |
function fr(e) { | |
var t = e._eventListeners; | |
for (var n in t) | |
for (var r = t[n], i = r.length - 1; i >= 0; i--) | |
e.removeEventListener(n, r[i]) | |
} | |
function hr(e) { | |
const t = Object.create(null) | |
, n = [] | |
, r = Object.create(null) | |
, i = { | |
AUDIO: o, | |
IMG: o, | |
SCRIPT: d, | |
VIDEO: o | |
}; | |
function o(e) { | |
var t = this | |
, n = xt(t) | |
, i = n && n.getAttribute("src"); | |
t.onerror = null, | |
t.removeEventListener("error", o, !1), | |
t.removeEventListener("load", o, !1), | |
"error" === e.type && i && (e.stopImmediatePropagation(), | |
Object(v.isStoredURL)(i) || t.setAttribute("data-src", i), | |
Ot(i, r).then((function(e) { | |
e && t.setAttribute("src", e) | |
} | |
))) | |
} | |
function s(e) { | |
var i = new t.Audio; | |
return i.addEventListener("error", o, !1), | |
i.addEventListener("load", o, !1), | |
e && (i.setAttribute("data-src", e), | |
Ot(e, r).then((function(e) { | |
var t = i.paused; | |
i.setAttribute("src", e), | |
t || i.play() | |
} | |
))), | |
n.push(i), | |
i | |
} | |
function u() { | |
return e.Audio === s | |
} | |
function l() { | |
e && !u() && [e.Audio, e.Image, e.Document.prototype.createElement, e.HTMLMediaElement.prototype.load, e.HTMLMediaElement.prototype.play, e.EventTarget.prototype.addEventListener, e.EventTarget.prototype.removeEventListener].forEach(e=>{ | |
t[e.name] = e | |
} | |
) | |
} | |
function c(t, n, r) { | |
if (t = t && t.textContent || t) | |
try { | |
e.eval(t) | |
} catch (e) { | |
if (console.warn("Error evaluating script", "string" == typeof n ? n : "", e.message), | |
r = "number" == typeof r ? r : 0, | |
cr.test(e.message) && r > 0) | |
return a.timeout(c.bind(null, t, n, --r), 2e3) | |
} | |
return Promise.resolve() | |
} | |
function d() { | |
var t = this | |
, n = t.getAttribute("src"); | |
t.removeEventListener("error", d, !1), | |
Mt(n, r).then((function(r) { | |
r && ((e.document.querySelector("head, body") || e.document).appendChild(t), | |
t.removeAttribute("src"), | |
t.appendChild(e.document.createTextNode(r)), | |
c(r, n, 1)) | |
} | |
)) | |
} | |
function f(e) { | |
var r = t.createElement.call(this, e); | |
return r && /^script$/i.test(e) && r.addEventListener("error", d, !1), | |
r && /^(audio|video)$/i.test(e) && n.push(r), | |
r | |
} | |
function h() { | |
for (var e = new t.Image, n = ["width", "height"], r = Math.min(arguments.length, n.length), i = 0; i < r; i++) | |
e.setAttribute(n[i], arguments[i]); | |
return e.addEventListener("error", o, !1), | |
e.addEventListener("load", o, !1), | |
e | |
} | |
function p() { | |
var e = this | |
, n = xt(e) | |
, i = n && n.getAttribute("src"); | |
i && !Object(v.isStoredURL)(i) && (n.setAttribute("data-src", i), | |
Ot(i, r).then((function(r) { | |
n.setAttribute("src", r), | |
t.load.call(e) | |
} | |
))) | |
} | |
function m() { | |
var e = this | |
, n = xt(e) | |
, i = n && n.getAttribute("src"); | |
return Object(v.isStoredURL)(i) ? t.play.call(e) : i ? (n.setAttribute("data-src", i), | |
Ot(i, r).then((function(r) { | |
return n.setAttribute("src", r), | |
t.play.call(e) | |
} | |
))) : void 0 | |
} | |
function b(e, n, r) { | |
t.addEventListener.call(this, e, n, r), | |
function(e, t, n) { | |
var r = e._eventListeners || (e._eventListeners = {}); | |
t in r || (r[t] = []), | |
-1 === r[t].indexOf(n) && (r[t].push(n), | |
dr(e, t, !0)) | |
}(this, e, n) | |
} | |
function g(e, n, r) { | |
t.removeEventListener.call(this, e, n, r), | |
function(e, t, n) { | |
var r = e._eventListeners | |
, i = r && r[t] || [] | |
, o = i.indexOf(n); | |
-1 !== o && (i.splice(o, 1), | |
0 === i.length && (delete r[t], | |
dr(e, t, !1))) | |
}(this, e, n) | |
} | |
this.setEPubData = function(e, t, n) { | |
r.files = e, | |
r.root = t || "", | |
r.deliverableId = n || "" | |
} | |
, | |
this.patchPrototypeMethods = function() { | |
e && !u() && (e.Audio = s, | |
e.Image = h, | |
e.Document.prototype.createElement = f, | |
e.HTMLMediaElement.prototype.load = p, | |
e.HTMLMediaElement.prototype.play = m, | |
e.EventTarget.prototype.addEventListener = b, | |
e.EventTarget.prototype.removeEventListener = g) | |
} | |
, | |
this.identifyClickableTargets = function() { | |
var t = e.document; | |
(t ? ["click", "mouseup", "touchend"] : []).forEach((function(e) { | |
var n = t.querySelectorAll("[on" + e + "]"); | |
Array.prototype.forEach.call(n, (function(t) { | |
dr(t, e, !0) | |
} | |
)) | |
} | |
)) | |
} | |
, | |
this.evaluateScript = c, | |
this.genericErrorHandler = function(e) { | |
var t = e && e.target | |
, n = "error" === e.type && i[t.nodeName]; | |
n && n.call(t, e) | |
} | |
, | |
this.removeEventListeners = function(e) { | |
e instanceof Array || e instanceof NodeList ? Array.prototype.forEach.call(e, fr) : fr(e) | |
} | |
, | |
this.getEventListeners = function(e, t) { | |
var n = e && e._eventListeners || Object.create(null); | |
return t ? n[t] || [] : n | |
} | |
, | |
this.hasEventListener = function(e, t) { | |
var n = e && e._eventListeners; | |
function r(e) { | |
return e in n && n[e].length > 0 | |
} | |
return !!n && (t ? t instanceof Array ? t.some(r) : r(t) : Object.keys(n).length > 0) | |
} | |
, | |
this.setContext = function(t) { | |
t !== e && "[object Window]" === Object.prototype.toString.call(t) && (e = t, | |
l()) | |
} | |
, | |
this.reset = function() { | |
n.forEach((function(e) { | |
e.pause(), | |
e.src = "", | |
e.load() | |
} | |
)), | |
n.length = 0, | |
e && u() && (e.Audio = t.Audio, | |
e.Image = t.Image, | |
e.Document.prototype.createElement = t.createElement, | |
e.HTMLMediaElement.prototype.load = t.load, | |
e.HTMLMediaElement.prototype.play = t.play, | |
e.EventTarget.prototype.addEventListener = t.addEventListener, | |
e.EventTarget.prototype.removeEventListener = t.removeEventListener) | |
} | |
, | |
l() | |
} | |
function pr(e) { | |
return { | |
fileName: e.src, | |
childSequence: e.childSequence || [], | |
offset: 0 | |
} | |
} | |
class mr { | |
constructor(e) { | |
console.assert(e, "contentProvider is defined"), | |
this.contentProvider = e | |
} | |
getToCItemsOfSection() { | |
console.assert(this.contentProvider, "contentProvider is defined"); | |
var e = this.contentProvider.getEPubInfo().toc | |
, t = e && e.tocByPlayOrder || [] | |
, n = this.contentProvider.getNameOfCurrentSection(); | |
return t.filter(e=>e.src === n) | |
} | |
getPreviousToCItemOfSection(e) { | |
for (var t = this.getToCItemsOfSection(), n = t.length - 1; n >= 0; n--) | |
if (ln.compareLocalPosition(e, pr(t[n])) > 0) | |
return t[n]; | |
return null | |
} | |
getNextToCItemOfSection(e) { | |
for (var t = this.getToCItemsOfSection(), n = 0, r = t.length; n < r; n++) | |
if (ln.compareLocalPosition(e, pr(t[n])) < 0) | |
return t[n]; | |
return null | |
} | |
goToToCItem(e, t, n) { | |
console.assert(this.contentProvider, "contentProvider is defined"); | |
var r = this.contentProvider.getNameOfCurrentSection() | |
, i = t() | |
, o = this.getToCItemsOfSection().length; | |
const s = ()=>i === t() && r === this.contentProvider.getNameOfCurrentSection() && !n(); | |
return function t(n) { | |
return e(n > o).then(()=>s() ? t(n + 1) : Promise.resolve()) | |
}(0) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/AESDecrypt.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return c | |
} | |
)); | |
n("./node_modules/core-js/modules/es.typed-array.int32-array.js"), | |
n("./node_modules/core-js/modules/es.typed-array.uint8-array.js"); | |
const r = new Int32Array(new ArrayBuffer(1024)) | |
, i = new Int32Array(new ArrayBuffer(1024)) | |
, o = new Int32Array(new ArrayBuffer(1024)) | |
, s = new Int32Array(new ArrayBuffer(1024)) | |
, a = new Uint8Array(new ArrayBuffer(256)) | |
, u = new Uint8Array(new ArrayBuffer(256)); | |
function l(e, t, n) { | |
e[t++] = n >>> 24 & 255, | |
e[t++] = n >> 16 & 255, | |
e[t++] = n >> 8 & 255, | |
e[t] = 255 & n | |
} | |
!function() { | |
for (var e, t, n, l, c, d, f = [], h = [], p = 0; p < 256; p++) | |
h[(f[p] = p << 1 ^ 283 * (p >> 7)) ^ p] = p; | |
for (e = t = 0; !a[e]; e ^= n || 1, | |
t = h[t] || 1) | |
c = (c = t ^ t << 1 ^ t << 2 ^ t << 3 ^ t << 4) >> 8 ^ 255 & c ^ 99, | |
a[e] = c, | |
u[c] = e, | |
d = 16843009 * f[l = f[n = f[e]]] ^ 65537 * l ^ 257 * n ^ 16843008 * e, | |
r[c] = d = d << 24 ^ d >>> 8, | |
i[c] = d = d << 24 ^ d >>> 8, | |
o[c] = d = d << 24 ^ d >>> 8, | |
s[c] = d = d << 24 ^ d >>> 8 | |
}(); | |
class c { | |
constructor() { | |
this.decryptionKey = null, | |
this.numRounds = 0 | |
} | |
setDecryptionKey(e) { | |
var t = e.length; | |
if (4 !== t && 6 !== t && 8 !== t) | |
throw "Invalid AES key size"; | |
var n = 4 * t + 28 | |
, u = new Int32Array(new ArrayBuffer(4 * n)); | |
this.decryptionKey = new Int32Array(new ArrayBuffer(4 * n)), | |
this.numRounds = t + 5; | |
var l, c, d, f, h = 1; | |
for (l = 0; l < t; l++) | |
u[l] = e[l]; | |
for (l = t; l < n; l++) | |
d = u[l - 1], | |
(l % t == 0 || 8 === t && l % t == 4) && (d = a[d >>> 24] << 24 ^ a[d >> 16 & 255] << 16 ^ a[d >> 8 & 255] << 8 ^ a[255 & d], | |
l % t == 0 && (d = d << 8 ^ d >>> 24 ^ h << 24, | |
h = h << 1 ^ 283 * (h >> 7))), | |
f = u[l - t] ^ d, | |
u[l] = f; | |
for (c = 0; l; c++, | |
l--) | |
d = u[3 & c ? l : l - 4], | |
f = l <= 4 || c < 4 ? d : r[a[d >>> 24]] ^ i[a[d >> 16 & 255]] ^ o[a[d >> 8 & 255]] ^ s[a[255 & d]], | |
this.decryptionKey[c] = f | |
} | |
decrypt(e, t, n) { | |
var a, c, d, f, h = this.decryptionKey, p = n, m = (e[p++] << 24 | e[p++] << 16 | e[p++] << 8 | e[p++]) ^ h[0], b = (e[p++] << 24 | e[p++] << 16 | e[p++] << 8 | e[p++]) ^ h[3], g = (e[p++] << 24 | e[p++] << 16 | e[p++] << 8 | e[p++]) ^ h[2], y = (e[p++] << 24 | e[p++] << 16 | e[p++] << 8 | e[p++]) ^ h[1]; | |
for (p = 0, | |
f = 4; p < this.numRounds; p++) | |
a = r[m >>> 24 & 255] ^ i[y >> 16 & 255] ^ o[g >> 8 & 255] ^ s[255 & b] ^ h[f++], | |
c = r[y >>> 24 & 255] ^ i[g >> 16 & 255] ^ o[b >> 8 & 255] ^ s[255 & m] ^ h[f++], | |
d = r[g >>> 24 & 255] ^ i[b >> 16 & 255] ^ o[m >> 8 & 255] ^ s[255 & y] ^ h[f++], | |
b = r[b >>> 24 & 255] ^ i[m >> 16 & 255] ^ o[y >> 8 & 255] ^ s[255 & g] ^ h[f++], | |
m = a, | |
y = c, | |
g = d; | |
l(t, n + 0, u[m >>> 24] << 24 ^ u[y >> 16 & 255] << 16 ^ u[g >> 8 & 255] << 8 ^ u[255 & b] ^ h[f++]), | |
l(t, n + 12, u[y >>> 24] << 24 ^ u[g >> 16 & 255] << 16 ^ u[b >> 8 & 255] << 8 ^ u[255 & m] ^ h[f++]), | |
l(t, n + 8, u[g >>> 24] << 24 ^ u[b >> 16 & 255] << 16 ^ u[m >> 8 & 255] << 8 ^ u[255 & y] ^ h[f++]), | |
l(t, n + 4, u[b >>> 24] << 24 ^ u[m >> 16 & 255] << 16 ^ u[y >> 8 & 255] << 8 ^ u[255 & g] ^ h[f]) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/BaseUtil.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
n.d(t, "NODE_TYPE", (function() { | |
return o | |
} | |
)), | |
n.d(t, "escapeRegExpMetaChars", (function() { | |
return a | |
} | |
)), | |
n.d(t, "getRegExpToCompare", (function() { | |
return u | |
} | |
)), | |
n.d(t, "checkPendingPromise", (function() { | |
return l | |
} | |
)), | |
n.d(t, "debounce", (function() { | |
return c | |
} | |
)), | |
n.d(t, "getDebouncedFunction", (function() { | |
return d | |
} | |
)), | |
n.d(t, "throttle", (function() { | |
return f | |
} | |
)), | |
n.d(t, "timeout", (function() { | |
return h | |
} | |
)), | |
n.d(t, "getPlatform", (function() { | |
return p | |
} | |
)), | |
n.d(t, "hasSVGSupport", (function() { | |
return m | |
} | |
)), | |
n.d(t, "getLocationURL", (function() { | |
return b | |
} | |
)), | |
n.d(t, "isInlineElement", (function() { | |
return g | |
} | |
)), | |
n.d(t, "isDocumentNode", (function() { | |
return y | |
} | |
)), | |
n.d(t, "isElementNode", (function() { | |
return v | |
} | |
)), | |
n.d(t, "isTextNode", (function() { | |
return _ | |
} | |
)), | |
n.d(t, "isElementOrTextNode", (function() { | |
return w | |
} | |
)), | |
n.d(t, "isCharacterDataNode", (function() { | |
return S | |
} | |
)), | |
n.d(t, "isMetaNode", (function() { | |
return E | |
} | |
)), | |
n.d(t, "getMetaAttribute", (function() { | |
return j | |
} | |
)), | |
n.d(t, "isNewMetaNode", (function() { | |
return x | |
} | |
)), | |
n.d(t, "isSplittedTextNode", (function() { | |
return O | |
} | |
)), | |
n.d(t, "isEnumerableNode", (function() { | |
return M | |
} | |
)), | |
n.d(t, "unwrapNode", (function() { | |
return k | |
} | |
)), | |
n.d(t, "setClass", (function() { | |
return A | |
} | |
)), | |
n.d(t, "isValidClassToken", (function() { | |
return C | |
} | |
)), | |
n.d(t, "getComputedStyleValue", (function() { | |
return I | |
} | |
)), | |
n.d(t, "getCascadedStyle", (function() { | |
return R | |
} | |
)), | |
n.d(t, "getMatchedCSSRules", (function() { | |
return T | |
} | |
)), | |
n.d(t, "getRange", (function() { | |
return P | |
} | |
)), | |
n.d(t, "getSelectedRange", (function() { | |
return L | |
} | |
)), | |
n.d(t, "getTextBoundingBox", (function() { | |
return N | |
} | |
)), | |
n.d(t, "getBoundingBox", (function() { | |
return B | |
} | |
)), | |
n.d(t, "checkParserError", (function() { | |
return D | |
} | |
)); | |
n("./node_modules/core-js/modules/es.string.replace.js"); | |
const r = { | |
tolino: /tolino (shine\s*\d?|visi[oó]n\s*\d?|page\s*\d?|epos\s*\d?)|imx50_rdp/, | |
android: /Android\s+([\d.]+)/i, | |
ios: /(?:iPhone|iPad|iPod).*OS\s+([\d_.]+)/i, | |
macos: /Mac OS X 10[_.]([\d_.]+)/i, | |
windows: /Windows\s+([^;])/i | |
} | |
, i = { | |
b: !0, | |
big: !0, | |
i: !0, | |
small: !0, | |
tt: !0, | |
abbr: !0, | |
acronym: !0, | |
cite: !0, | |
code: !0, | |
dfn: !0, | |
em: !0, | |
kbd: !0, | |
strong: !0, | |
samp: !0, | |
var: !0, | |
a: !0, | |
bdo: !0, | |
br: !0, | |
q: !0, | |
script: !0, | |
span: !0, | |
sub: !0, | |
sup: !0 | |
} | |
, o = { | |
ELEMENT_NODE: 1, | |
ATTRIBUTE_NODE: 2, | |
TEXT_NODE: 3, | |
CDATA_SECTION_NODE: 4, | |
ENTITY_REFERENCE_NODE: 5, | |
ENTITY_NODE: 6, | |
PROCESSING_INSTRUCTION_NODE: 7, | |
COMMENT_NODE: 8, | |
DOCUMENT_NODE: 9, | |
DOCUMENT_TYPE_NODE: 10, | |
DOCUMENT_FRAGMENT_NODE: 11, | |
NOTATION_NODE: 12 | |
}; | |
function s(e) { | |
var t, n = function e(t) { | |
var n; | |
if (_(t) && t.length > 0) | |
return t; | |
for (t = t.firstChild; t; ) { | |
if (n = e(t)) | |
return n; | |
t = t.nextSibling | |
} | |
}(e); | |
if (n) { | |
var r = P(n, 0, Math.min(2, n.length)); | |
if (r) | |
t = r.getBoundingClientRect().height | |
} | |
return t || 1.2 * I(e, "font-size") || 0 | |
} | |
function a(e) { | |
return e.replace(/[-*+?.()[\]{}\\^$|#]/g, "\\$&") | |
} | |
function u(e, t=!0) { | |
return t ? new RegExp("^" + a(e) + "$","i") : new RegExp(a(e),"i") | |
} | |
function l(e, t) { | |
let n = t.name || t.toString() | |
, r = l.promises[n]; | |
return r || (r = l.promises[n] = {}), | |
r[e] || (r[e] = t().then(t=>(r[e] = null, | |
t)).catch(t=>(r[e] = null, | |
Promise.reject(t)))) | |
} | |
function c(e, t) { | |
if (e) { | |
var n = e.name || e.toString() | |
, r = this | |
, i = arguments; | |
c.debouncedFn[n] && clearTimeout(c.debouncedFn[n]), | |
c.debouncedFn[n] = setTimeout((function() { | |
c.debouncedFn[n] = null, | |
e.apply(r, i) | |
} | |
), t) | |
} | |
} | |
function d(e, t) { | |
var n; | |
return function() { | |
var r = this | |
, i = arguments; | |
return new Promise(o=>{ | |
n && clearTimeout(n), | |
n = setTimeout(()=>(n = null, | |
o(e.apply(r, i))), t) | |
} | |
) | |
} | |
} | |
function f(e, t, n) { | |
var r, i, o, s = null, a = 0, u = !n || !1 !== n.leading, l = !n || !1 !== n.trailing; | |
function c() { | |
a = u ? Date.now() : 0, | |
s = null, | |
o = e.apply(r, i), | |
r = i = null | |
} | |
return function() { | |
var n = Date.now(); | |
a || u || (a = n); | |
var d = t - (n - a); | |
return r = this, | |
i = arguments, | |
d <= 0 ? (clearTimeout(s), | |
s = null, | |
a = n, | |
o = e.apply(r, i), | |
r = i = null) : !s && l && (s = setTimeout(c, d)), | |
o | |
} | |
} | |
function h(e, t) { | |
return new Promise(n=>{ | |
setTimeout(()=>n(e()), t) | |
} | |
) | |
} | |
function p(e) { | |
var t, n, i; | |
for (t in console.assert("object" == typeof e && null !== e, "navigator object is defined"), | |
r) | |
if (n = r[t].exec(e.userAgent)) | |
return i = parseFloat(n[1].replace("_", "."), 10), | |
{ | |
Platform: e.platform, | |
OS: t, | |
Version: isNaN(i) ? n[1] : i | |
}; | |
return n = /\(([^\)]+)/.exec(e.userAgent), | |
{ | |
Platform: e.platform || "undefined", | |
OS: n && n[1] || "other" | |
} | |
} | |
function m(e) { | |
var t = e && e.document && e.document.createElementNS; | |
try { | |
if (t && t("http://www.w3.org/2000/svg", "svg").createSVGRect) | |
return !0 | |
} catch (e) {} | |
var n = p(e.navigator); | |
return "android" !== n.OS || n.Version >= 4.4 | |
} | |
function b(e, t) { | |
var n = e.protocol + "//" + e.host | |
, r = e.pathname.split("/"); | |
return r.pop(), | |
n + r.join("/") + "/" + (t || "") | |
} | |
function g(e) { | |
return i[e.nodeName.toLowerCase()] | |
} | |
function y(e) { | |
return !!e && (e.nodeType === o.DOCUMENT_NODE || e.nodeType === o.DOCUMENT_FRAGMENT_NODE) | |
} | |
function v(e) { | |
return !!e && e.nodeType === o.ELEMENT_NODE | |
} | |
function _(e) { | |
return !!e && e.nodeType === o.TEXT_NODE | |
} | |
function w(e) { | |
return !!e && (e.nodeType === o.ELEMENT_NODE || e.nodeType === o.TEXT_NODE) | |
} | |
function S(e) { | |
return !!e && (e.nodeType === o.TEXT_NODE || e.nodeType === o.COMMENT_NODE || e.nodeType === o.CDATA_SECTION_NODE) | |
} | |
function E(e) { | |
return e && e.hasAttribute && e.hasAttribute("data-meta") | |
} | |
function j(e) { | |
return e && e.getAttribute && e.getAttribute("data-meta") | |
} | |
function x(e) { | |
return E(e) && (_(e.previousSibling) || _(e.nextSibling)) | |
} | |
function O(e) { | |
return _(e) && E(e.previousSibling) | |
} | |
function M(e) { | |
return !x(e) && !O(e) && e.nodeType !== o.PROCESSING_INSTRUCTION_NODE | |
} | |
function k(e) { | |
for (var t, n = e.parentNode; null !== (t = e.firstChild); ) | |
n.insertBefore(t, e); | |
n.removeChild(e), | |
n.normalize() | |
} | |
function A(e, t, n) { | |
e && e.classList && t && (n ? e.classList.add(t) : e.classList.remove(t)) | |
} | |
function C(e) { | |
return e && /^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(e) | |
} | |
function I(e, t) { | |
if (!e) | |
return 0; | |
if (_(e)) | |
return "lineHeight" === t || "line-height" === t ? s(e) : 0; | |
y() && (e = e.body); | |
var n = e.ownerDocument.defaultView.getComputedStyle(e, null) | |
, r = n && (n[t] || n.getPropertyValue(t)) | |
, i = parseFloat(r, 10); | |
return "lineHeight" === t || "line-height" === t ? "normal" === r ? s(e) : Math.max(i, 0) : isNaN(i) ? r || 0 : i | |
} | |
function R(e, t) { | |
var n = Array.prototype.find.call(t, t=>t.style[e]); | |
return n ? n.style[e] : null | |
} | |
function T(e) { | |
var t = [] | |
, n = e.ownerDocument || e | |
, r = Element.prototype.matches || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || function(e) { | |
return [].indexOf.call(n.querySelectorAll(e), this) >= 0 | |
} | |
; | |
function i(e) { | |
if (e && !e.disabled) | |
try { | |
var t = e.media && e.media.mediaText; | |
if (!t || n.defaultView.matchMedia(t).matches) { | |
var r = e.cssRules; | |
return Array.prototype.slice.call(r) | |
} | |
} catch (e) {} | |
return [] | |
} | |
return Array.prototype.forEach.call(n.styleSheets, n=>{ | |
for (var o, s = i(n); o = s.shift(); ) | |
if (o.styleSheet) | |
s = i(o.styleSheet).concat(s); | |
else if (o.media) | |
s = i(o).concat(s); | |
else if (6 !== o.type && o.selectorText) | |
try { | |
r.call(e, o.selectorText) && t.push(o) | |
} catch (e) { | |
console.warn(e) | |
} | |
} | |
), | |
t | |
} | |
function P(e, t, n) { | |
if (!e || !e.parentNode) | |
return null; | |
var r = e.ownerDocument.createRange(); | |
return void 0 !== t && _(e) && e.length > 1 ? (t >= (n = n || e.length - 1) && (t = n - 1), | |
r.setStart(e, t), | |
r.setEnd(e, n)) : r.selectNode(e), | |
r | |
} | |
function L(e) { | |
const t = e && e.getSelection && e.getSelection() || document.getSelection() | |
, n = t && t.rangeCount > 0 && t.getRangeAt(0); | |
return n && !n.collapsed ? n : null | |
} | |
function N(e, t, n) { | |
var r, i = null; | |
if (_(e) && (r = P(e, t, n)) && (i = r.getBoundingClientRect())) { | |
var o = r.getClientRects()[0]; | |
i.lineHeight = o ? o.height : 0 | |
} | |
return i | |
} | |
function B(e) { | |
return e && "function" == typeof e.getBoundingClientRect && e.getBoundingClientRect() || _(e) && N(e) || null | |
} | |
function D(e, t) { | |
if (e && (e.querySelector("parsererror") || 0 === e.childNodes.length)) { | |
var n = e.querySelector("parsererror > div") | |
, r = "Parser Error " + (t ? 'in file "' + t + '" -' : "-"); | |
return console.warn(r, n && n.textContent, e), | |
{ | |
message: r + n && n.textContent, | |
reason: "PARSER_ERROR" | |
} | |
} | |
return !1 | |
} | |
l.promises = {}, | |
c.debouncedFn = {} | |
}, | |
"./musketeer/modules/tolino-shared/services/Crypto.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return u | |
} | |
)); | |
n("./node_modules/core-js/modules/es.typed-array.uint8-array.js"); | |
var r = n("./musketeer/modules/tolino-shared/services/zip/ByteArray.js") | |
, i = n("./musketeer/modules/tolino-shared/services/StringUtil.js") | |
, o = n("./musketeer/modules/tolino-shared/services/AESDecrypt.js"); | |
function s(e) { | |
return e < 16 ? "0" + e.toString(16) : e.toString(16) | |
} | |
function a(e) { | |
for (var t = new Array(4), n = 0, r = 0; n < 16; n += 4) | |
t[r++] = e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]; | |
return t | |
} | |
class u { | |
constructor() { | |
this.deviceKey = null, | |
this.aesDecrypt = new o.a | |
} | |
setDeviceKey(e) { | |
console.assert(!!e, "setDeviceKey: Device key required"); | |
var t = Object(i.decodeString)(e) | |
, n = "e\t\n\v\f\0õ#\n\0d".split("").map(e=>e.charCodeAt(0)); | |
this.aesDecrypt.setDecryptionKey(a(n)), | |
this.deviceKey = this._decryptECB(t) | |
} | |
decryptContent(e, t, n) { | |
console.assert(!!this.deviceKey, "deviceKey is set"); | |
var i = this._decryptKey2Array(e); | |
return this.aesDecrypt.setDecryptionKey(a(i)), | |
r.a.asUTF8String(this._decryptCBC(t, n)) | |
} | |
decryptPassword(e) { | |
console.assert(!!this.deviceKey, "deviceKey is set"); | |
var t = this._decryptKey2Array(e); | |
return Array.prototype.map.call(t, s).join("") | |
} | |
_decryptECB(e) { | |
var t = e.length; | |
if (t % 16 != 0) | |
throw "Invalid AES block length"; | |
for (var n = new Uint8Array(new ArrayBuffer(t)), r = 0; r < t; r += 16) | |
this.aesDecrypt.decrypt(e, n, r); | |
return n | |
} | |
_decryptCBC(e, t) { | |
var n = t.length; | |
if (n % 16 != 0) | |
throw "Invalid AES block length"; | |
var r, i, o, s, a = new Uint8Array(new ArrayBuffer(n)), u = 0, l = 0; | |
for (this.aesDecrypt.decrypt(t, a, u); u < 16; ) | |
a[u++] ^= e[l++]; | |
for (l = 0; u < n; ) | |
for (this.aesDecrypt.decrypt(t, a, u), | |
r = u + 16; u < r; ) | |
a[u++] ^= t[l++]; | |
return o = (i = a).length, | |
s = i[o - 1], | |
i.subarray(0, o - s) | |
} | |
_decryptKey2Array(e) { | |
return this.aesDecrypt.setDecryptionKey(a(this.deviceKey)), | |
this._decryptECB(e) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/KeyHandler.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return u | |
} | |
)); | |
var r = n("./node_modules/postal/lib/postal.js") | |
, i = n.n(r); | |
function o(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
const s = { | |
BACKSPACE: 1, | |
TAB: 2, | |
RETURN: 3, | |
SPACE: 4, | |
PAGE_UP: 5, | |
PAGE_DOWN: 6, | |
LEFT: 7, | |
UP: 8, | |
RIGHT: 9, | |
DOWN: 10, | |
CTRL_I: 11, | |
SHIFT_LEFT: 12, | |
SHIFT_RIGHT: 13 | |
} | |
, a = { | |
8: [{ | |
id: s.BACKSPACE | |
}], | |
9: [{ | |
id: s.TAB, | |
noPreventDefault: !0 | |
}], | |
13: [{ | |
id: s.RETURN | |
}], | |
32: [{ | |
id: s.SPACE | |
}], | |
33: [{ | |
id: s.PAGE_UP | |
}], | |
34: [{ | |
id: s.PAGE_DOWN | |
}], | |
37: [{ | |
id: s.SHIFT_LEFT, | |
modifier: "shiftKey" | |
}, { | |
id: s.LEFT | |
}], | |
38: [{ | |
id: s.UP | |
}], | |
39: [{ | |
id: s.SHIFT_RIGHT, | |
modifier: "shiftKey" | |
}, { | |
id: s.RIGHT | |
}], | |
40: [{ | |
id: s.DOWN | |
}], | |
73: [{ | |
id: s.CTRL_I, | |
noPreventDefault: !0, | |
modifier: "ctrlKey" | |
}] | |
}; | |
class u { | |
constructor(e, t) { | |
o(this, "onKeyDown", e=>{ | |
var t, n, r = e.keyCode || e.which, o = a[r], s = o && o.find(t=>function(e, t) { | |
return e && (!e.modifier || t[e.modifier]) | |
}(t, e)); | |
s && (t = e.target, | |
"INPUT" !== (n = (t && t.nodeName || "").toUpperCase()) && "TEXTAREA" !== n) && (i.a.channel(this.channelName).publish("interaction.key", { | |
event: e, | |
keyCode: r, | |
keyId: s.id | |
}), | |
s.noPreventDefault || e.preventDefault()) | |
} | |
), | |
o(this, "enable", ()=>{ | |
this.element.addEventListener("keydown", this.onKeyDown, !1) | |
} | |
), | |
o(this, "disable", ()=>{ | |
this.element.removeEventListener("keydown", this.onKeyDown, !1) | |
} | |
), | |
this.element = e || document.documentElement, | |
this.channelName = t || "reader" | |
} | |
static get keyId() { | |
return s | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/Metadata.js": function(e, t, n) { | |
"use strict"; | |
(function(e) { | |
n("./musketeer/modules/tolino-shared/globals.js"), | |
n("./musketeer/modules/tolino-shared/services/Reseller.js") | |
} | |
).call(this, n("./node_modules/webpack/buildin/global.js")) | |
}, | |
"./musketeer/modules/tolino-shared/services/Reseller.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return o | |
} | |
)); | |
var r = n("./musketeer/modules/tolino-shared/globals.js"); | |
function i(e) { | |
const t = e && e.resellerCountryResponse && e.resellerCountryResponse.resellerCountryGroups; | |
let n = {}; | |
if (t) | |
for (let e in t) | |
n[t[e].languageCode] = t[e].resellerCountries; | |
return n | |
} | |
class o { | |
async fetchCountries() { | |
return async function(e) { | |
const t = { | |
Accept: "application/json", | |
"Content-Type": "application/json" | |
} | |
, n = r.a.NET.RESELLER_GROUP | |
, o = r.a.NET.BACKEND_BASE_URL + "reseller/countries?resellerGroup=" + n; | |
let s; | |
try { | |
s = await fetch(o, { | |
method: "GET", | |
headers: t | |
}) | |
} catch (e) { | |
console.log(e) | |
} | |
if (s && s.ok) | |
return s.json().then(i); | |
throw s | |
}() | |
} | |
async fetchResellers() { | |
return async function(e) {}() | |
} | |
async fetchConfig() { | |
return async function(e) {}() | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/StringUtil.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
n.d(t, "lengthInUTF8Bytes", (function() { | |
return p | |
} | |
)), | |
n.d(t, "decodeString", (function() { | |
return m | |
} | |
)), | |
n.d(t, "unescapeEntities", (function() { | |
return b | |
} | |
)), | |
n.d(t, "replaceAccentedCharacters", (function() { | |
return g | |
} | |
)), | |
n.d(t, "latinize", (function() { | |
return y | |
} | |
)), | |
n.d(t, "capitalizeFirstLetter", (function() { | |
return v | |
} | |
)), | |
n.d(t, "compactString", (function() { | |
return _ | |
} | |
)), | |
n.d(t, "getByteOffset", (function() { | |
return w | |
} | |
)), | |
n.d(t, "getCharOffsetForUTF8Bytes", (function() { | |
return S | |
} | |
)), | |
n.d(t, "encodeUTF8", (function() { | |
return E | |
} | |
)), | |
n.d(t, "encodeBase64", (function() { | |
return j | |
} | |
)), | |
n.d(t, "encodeURIComponent", (function() { | |
return x | |
} | |
)); | |
n("./node_modules/core-js/modules/es.string.replace.js"); | |
const r = { | |
quot: 34, | |
amp: 38, | |
apos: 39, | |
lt: 60, | |
gt: 62, | |
nbsp: 160, | |
iexcl: 161, | |
cent: 162, | |
pound: 163, | |
curren: 164, | |
yen: 165, | |
brvbar: 166, | |
sect: 167, | |
uml: 168, | |
copy: 169, | |
ordf: 170, | |
laquo: 171, | |
not: 172, | |
shy: 173, | |
reg: 174, | |
macr: 175, | |
deg: 176, | |
plusmn: 177, | |
sup2: 178, | |
sup3: 179, | |
acute: 180, | |
micro: 181, | |
para: 182, | |
middot: 183, | |
cedil: 184, | |
sup1: 185, | |
ordm: 186, | |
raquo: 187, | |
frac14: 188, | |
frac12: 189, | |
frac34: 190, | |
iquest: 191, | |
Agrave: 192, | |
Aacute: 193, | |
Acirc: 194, | |
Atilde: 195, | |
Auml: 196, | |
Aring: 197, | |
AElig: 198, | |
Ccedil: 199, | |
Egrave: 200, | |
Eacute: 201, | |
Ecirc: 202, | |
Euml: 203, | |
Igrave: 204, | |
Iacute: 205, | |
Icirc: 206, | |
Iuml: 207, | |
ETH: 208, | |
Ntilde: 209, | |
Ograve: 210, | |
Oacute: 211, | |
Ocirc: 212, | |
Otilde: 213, | |
Ouml: 214, | |
times: 215, | |
Oslash: 216, | |
Ugrave: 217, | |
Uacute: 218, | |
Ucirc: 219, | |
Uuml: 220, | |
Yacute: 221, | |
THORN: 222, | |
szlig: 223, | |
agrave: 224, | |
aacute: 225, | |
acirc: 226, | |
atilde: 227, | |
auml: 228, | |
aring: 229, | |
aelig: 230, | |
ccedil: 231, | |
egrave: 232, | |
eacute: 233, | |
ecirc: 234, | |
euml: 235, | |
igrave: 236, | |
iacute: 237, | |
icirc: 238, | |
iuml: 239, | |
eth: 240, | |
ntilde: 241, | |
ograve: 242, | |
oacute: 243, | |
ocirc: 244, | |
otilde: 245, | |
ouml: 246, | |
divide: 247, | |
oslash: 248, | |
ugrave: 249, | |
uacute: 250, | |
ucirc: 251, | |
uuml: 252, | |
yacute: 253, | |
thorn: 254, | |
yuml: 255, | |
OElig: 338, | |
oelig: 339, | |
Scaron: 352, | |
scaron: 353, | |
Yuml: 376, | |
fnof: 402, | |
circ: 710, | |
tilde: 732, | |
Alpha: 913, | |
Beta: 914, | |
Gamma: 915, | |
Delta: 916, | |
Epsilon: 917, | |
Zeta: 918, | |
Eta: 919, | |
Theta: 920, | |
Iota: 921, | |
Kappa: 922, | |
Lambda: 923, | |
Mu: 924, | |
Nu: 925, | |
Xi: 926, | |
Omicron: 927, | |
Pi: 928, | |
Rho: 929, | |
Sigma: 931, | |
Tau: 932, | |
Upsilon: 933, | |
Phi: 934, | |
Chi: 935, | |
Psi: 936, | |
Omega: 937, | |
alpha: 945, | |
beta: 946, | |
gamma: 947, | |
delta: 948, | |
epsilon: 949, | |
zeta: 950, | |
eta: 951, | |
theta: 952, | |
iota: 953, | |
kappa: 954, | |
lambda: 955, | |
mu: 956, | |
nu: 957, | |
xi: 958, | |
omicron: 959, | |
pi: 960, | |
rho: 961, | |
sigmaf: 962, | |
sigma: 963, | |
tau: 964, | |
upsilon: 965, | |
phi: 966, | |
chi: 967, | |
psi: 968, | |
omega: 969, | |
thetasym: 977, | |
upsih: 978, | |
piv: 982, | |
ensp: 8194, | |
emsp: 8195, | |
thinsp: 8201, | |
zwnj: 8204, | |
zwj: 8205, | |
lrm: 8206, | |
rlm: 8207, | |
ndash: 8211, | |
mdash: 8212, | |
lsquo: 8216, | |
rsquo: 8217, | |
sbquo: 8218, | |
ldquo: 8220, | |
rdquo: 8221, | |
bdquo: 8222, | |
dagger: 8224, | |
Dagger: 8225, | |
bull: 8226, | |
hellip: 8230, | |
permil: 8240, | |
prime: 8242, | |
Prime: 8243, | |
lsaquo: 8249, | |
rsaquo: 8250, | |
oline: 8254, | |
frasl: 8260, | |
euro: 8364, | |
image: 8465, | |
weierp: 8472, | |
real: 8476, | |
trade: 8482, | |
alefsym: 8501, | |
larr: 8592, | |
uarr: 8593, | |
rarr: 8594, | |
darr: 8595, | |
harr: 8596, | |
crarr: 8629, | |
lArr: 8656, | |
uArr: 8657, | |
rArr: 8658, | |
dArr: 8659, | |
hArr: 8660, | |
forall: 8704, | |
part: 8706, | |
exist: 8707, | |
empty: 8709, | |
nabla: 8711, | |
isin: 8712, | |
notin: 8713, | |
ni: 8715, | |
prod: 8719, | |
sum: 8721, | |
minus: 8722, | |
lowast: 8727, | |
radic: 8730, | |
prop: 8733, | |
infin: 8734, | |
ang: 8736, | |
and: 8743, | |
or: 8744, | |
cap: 8745, | |
cup: 8746, | |
int: 8747, | |
there4: 8756, | |
sim: 8764, | |
cong: 8773, | |
asymp: 8776, | |
ne: 8800, | |
equiv: 8801, | |
le: 8804, | |
ge: 8805, | |
sub: 8834, | |
sup: 8835, | |
nsub: 8836, | |
sube: 8838, | |
supe: 8839, | |
oplus: 8853, | |
otimes: 8855, | |
perp: 8869, | |
sdot: 8901, | |
lceil: 8968, | |
rceil: 8969, | |
lfloor: 8970, | |
rfloor: 8971, | |
lang: 9001, | |
rang: 9002, | |
loz: 9674, | |
spades: 9824, | |
clubs: 9827, | |
hearts: 9829, | |
diams: 9830 | |
} | |
, i = { | |
quot: !0, | |
amp: !0, | |
apos: !0, | |
lt: !0, | |
gt: !0, | |
"#x0022": !0, | |
"#x0026": !0, | |
"#x0027": !0, | |
"#x003C": !0, | |
"#x003E": !0, | |
"#34": !0, | |
"#38": !0, | |
"#39": !0, | |
"#60": !0, | |
"#62": !0 | |
} | |
, o = { | |
"À": "A", | |
"Á": "A", | |
"Â": "A", | |
"Ã": "A", | |
"Ä": "A", | |
"Å": "A", | |
"Æ": "AE", | |
"Ç": "C", | |
"È": "E", | |
"É": "E", | |
"Ê": "E", | |
"Ë": "E", | |
"Ì": "I", | |
"Í": "I", | |
"Î": "I", | |
"Ï": "I", | |
"Ð": "D", | |
"Ñ": "N", | |
"Ò": "O", | |
"Ó": "O", | |
"Ô": "O", | |
"Õ": "O", | |
"Ö": "O", | |
"Ø": "O", | |
"Œ": "OE", | |
"Ù": "U", | |
"Ú": "U", | |
"Û": "U", | |
"Ü": "U", | |
"Ý": "Y", | |
"ß": "ss", | |
"à": "a", | |
"á": "a", | |
"â": "a", | |
"ã": "a", | |
"ä": "a", | |
"å": "a", | |
"æ": "ae", | |
"ç": "c", | |
"è": "e", | |
"é": "e", | |
"ê": "e", | |
"ë": "e", | |
"ì": "i", | |
"í": "i", | |
"î": "i", | |
"ï": "i", | |
"ð": "d", | |
"ñ": "n", | |
"ò": "o", | |
"ó": "o", | |
"ô": "o", | |
"õ": "o", | |
"ö": "o", | |
"ø": "o", | |
"œ": "oe", | |
"ù": "u", | |
"ú": "u", | |
"û": "u", | |
"ü": "u", | |
"ý": "y", | |
"ÿ": "y" | |
} | |
, s = { | |
"̀": "", | |
"́": "", | |
"̂": "", | |
"̃": "", | |
"̄": "", | |
"̆": "", | |
"̇": "", | |
"̈": "e", | |
"̉": "", | |
"̊": "", | |
"̋": "", | |
"̌": "" | |
} | |
, a = " ".charCodeAt(0) | |
, u = { | |
A: 0, | |
B: 1, | |
C: 2, | |
D: 3, | |
E: 4, | |
F: 5, | |
G: 6, | |
H: 7, | |
I: 8, | |
J: 9, | |
K: 10, | |
L: 11, | |
M: 12, | |
N: 13, | |
O: 14, | |
P: 15, | |
Q: 16, | |
R: 17, | |
S: 18, | |
T: 19, | |
U: 20, | |
V: 21, | |
W: 22, | |
X: 23, | |
Y: 24, | |
Z: 25, | |
a: 26, | |
b: 27, | |
c: 28, | |
d: 29, | |
e: 30, | |
f: 31, | |
g: 32, | |
h: 33, | |
i: 34, | |
j: 35, | |
k: 36, | |
l: 37, | |
m: 38, | |
n: 39, | |
o: 40, | |
p: 41, | |
q: 42, | |
r: 43, | |
s: 44, | |
t: 45, | |
u: 46, | |
v: 47, | |
w: 48, | |
x: 49, | |
y: 50, | |
z: 51, | |
0: 52, | |
1: 53, | |
2: 54, | |
3: 55, | |
4: 56, | |
5: 57, | |
6: 58, | |
7: 59, | |
8: 60, | |
9: 61, | |
"+": 62, | |
"/": 63, | |
"=": 64, | |
"-": 62, | |
_: 63 | |
} | |
, l = "function" == typeof TextEncoder ? new TextEncoder : null; | |
function c(e) { | |
return "#" !== e[0] ? r[e] || a : "x" === e[1] ? parseInt(e.substr(2), 16) : parseInt(e.substr(1), 10) | |
} | |
function d(e, t) { | |
return "&#" + c(t) + ";" | |
} | |
function f(e, t) { | |
return i[t] ? e : String.fromCharCode(c(t)) | |
} | |
function h(e) { | |
var t = s[e]; | |
return void 0 !== t ? t : e | |
} | |
const p = l ? e=>l.encode(e).length : e=>{ | |
var t = x(e).match(/%[89ABab]/g); | |
return t ? e.length + t.length : e.length | |
} | |
, m = e=>{ | |
var t = e.length | |
, n = t % 4; | |
if (3 === n) | |
throw new Error("The length of Base64-encoded data has to be a multiple of four (" + t + ")"); | |
n > 0 && (e += 2 === n ? "==" : "=", | |
t += n); | |
for (var r = [], i = 0; i < t; ) { | |
var o = u[e.charAt(i++)] | |
, s = u[e.charAt(i++)] | |
, a = u[e.charAt(i++)] | |
, l = u[e.charAt(i++)]; | |
if (void 0 === o || void 0 === s || void 0 === a || void 0 === l) { | |
var c = i - 4; | |
throw new Error('Argument contains invalid symbols "...' + e.substr(c, 4) + '..." at position ' + c) | |
} | |
r.push(o << 2 | s >> 4), | |
64 !== a && (r.push(s << 4 & 240 | a >> 2), | |
64 !== l && r.push(a << 6 & 192 | l)) | |
} | |
return r | |
} | |
; | |
function b(e, t) { | |
var n = t ? d : f; | |
return e.replace(/&(.+?);/g, n) | |
} | |
function g(e) { | |
return e.replace(/[^A-Za-z0-9 ]/g, h) | |
} | |
function y(e) { | |
return e && e.replace(/[^A-Za-z0-9]/g, e=>o[e] || e) || "" | |
} | |
function v(e) { | |
return e.charAt(0).toUpperCase() + e.slice(1) | |
} | |
function _(e) { | |
return e.replace(/\s+/g, " ").trim() | |
} | |
function w(e, t) { | |
if (!e) | |
return 0; | |
var n = void 0 === t ? e.textContent : e.textContent.substr(0, t); | |
return p(n) | |
} | |
function S(e, t) { | |
for (var n = 0; t > 0; n++) { | |
var r = e.codePointAt(n); | |
t -= r < 128 ? 1 : r < 2048 ? 2 : r <= 65535 ? 3 : 4 | |
} | |
return n | |
} | |
function E(e) { | |
for (var t = "", n = 0, r = (e = e.replace(/\r\n/g, "\n")).length; n < r; n++) { | |
var i = e.charCodeAt(n); | |
i < 128 ? t += String.fromCharCode(i) : i > 127 && i < 2048 ? (t += String.fromCharCode(i >> 6 | 192), | |
t += String.fromCharCode(63 & i | 128)) : (t += String.fromCharCode(i >> 12 | 224), | |
t += String.fromCharCode(i >> 6 & 63 | 128), | |
t += String.fromCharCode(63 & i | 128)) | |
} | |
return t | |
} | |
function j(e) { | |
if (window && window.btoa) | |
return window.btoa(e); | |
for (var t, n, r, i, o, s, a, u = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", l = "", c = 0, d = (e = E(e)).length; c < d; ) | |
i = (t = e.charCodeAt(c++)) >> 2, | |
o = (3 & t) << 4 | (n = e.charCodeAt(c++)) >> 4, | |
s = (15 & n) << 2 | (r = e.charCodeAt(c++)) >> 6, | |
a = 63 & r, | |
isNaN(n) ? s = a = 64 : isNaN(r) && (a = 64), | |
l += u.charAt(i) + u.charAt(o) + u.charAt(s) + u.charAt(a); | |
return l | |
} | |
function x(e) { | |
if (window && window.encodeURIComponent) | |
return window.encodeURIComponent(e); | |
function t(e) { | |
return 65 <= e && e <= 90 || 97 <= e && e <= 122 || 48 <= e && e <= 57 || 39 <= e && e <= 42 || 33 === e || 45 === e || 46 === e || 95 === e || 126 === e | |
} | |
function n(e) { | |
return 55296 == (64512 & e) | |
} | |
function r(e) { | |
return 56320 == (64512 & e) | |
} | |
function i(e) { | |
return "%" + "0123456789ABCDEF".charAt(e >> 4) + "0123456789ABCDEF".charAt(15 & e) | |
} | |
function o(e) { | |
return e <= 127 ? i(e) : e <= 2047 ? i(192 + (e >> 6 & 63)) + i(128 + (63 & e)) : i(224 + (e >> 12 & 15)) + i(128 + (e >> 6 & 63)) + i(128 + (63 & e)) | |
} | |
function s(e, t) { | |
const n = 1 + (e >> 6 & 15); | |
return i(240 + (n >> 2)) + i(128 + ((3 & n) << 4 | e >> 2 & 15)) + i(128 + ((3 & e) << 4 | t >> 6 & 15)) + i(128 + (63 & t)) | |
} | |
let a = ""; | |
for (let i = 0, u = e.length; i < u; i++) { | |
let l = e.charCodeAt(i); | |
if (n(l)) { | |
if (i++, | |
i < u) { | |
let t = e.charCodeAt(i); | |
r(t) && (a += s(l, t)) | |
} | |
} else | |
r(l) || (a += t(l) ? e.charAt(i) : o(l)) | |
} | |
return a | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/TextToSpeech.js": function(e, t, n) { | |
"use strict"; | |
function r(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
n.r(t), | |
n.d(t, "default", (function() { | |
return b | |
} | |
)), | |
n.d(t, "EVENT_TYPES", (function() { | |
return i | |
} | |
)), | |
n.d(t, "PITCHES", (function() { | |
return s | |
} | |
)), | |
n.d(t, "RATES", (function() { | |
return o | |
} | |
)), | |
n.d(t, "isSupportedByPlatform", (function() { | |
return d | |
} | |
)), | |
n.d(t, "isAllowedForDeliverable", (function() { | |
return f | |
} | |
)), | |
n.d(t, "getVoices", (function() { | |
return h | |
} | |
)), | |
n.d(t, "getVoicesForCountry", (function() { | |
return p | |
} | |
)), | |
n.d(t, "getVoicesForLanguage", (function() { | |
return m | |
} | |
)); | |
const i = { | |
END: "end", | |
PAUSE: "pause", | |
PROGRESS: "progress", | |
RESUME: "resume", | |
START: "start" | |
} | |
, o = { | |
.75: .75, | |
"1.0": 1, | |
1.25: 1.25, | |
1.5: 1.5, | |
1.75: 1.75, | |
"2.0": 2, | |
2.5: 2.5, | |
"3.0": 3 | |
} | |
, s = { | |
"0.0": 0, | |
.5: .5, | |
"1.0": 1, | |
1.5: 1.5, | |
"2.0": 2 | |
} | |
, a = o["1.0"] | |
, u = s["1.0"] | |
, l = { | |
de: "German", | |
en: "English", | |
fr: "French", | |
it: "Italian", | |
nl: "Dutch", | |
es: "Spanish" | |
} | |
, c = e=>Boolean(e && e.constructor === String && e.length > 0) | |
, d = ()=>"speechSynthesis"in window && "SpeechSynthesisUtterance"in window && !1 === Modernizr.isios && !1 === Modernizr.isandroid && !1 === Modernizr.issafari | |
, f = e=>{ | |
var t; | |
let n = !1; | |
return "EDATA" === (null === (t = e.type) || void 0 === t ? void 0 : t.category) ? n = !0 : e.isTTSEnabled && (n = JSON.parse(e.isTTSEnabled)), | |
n | |
} | |
, h = ()=>{ | |
let e = {}; | |
const t = speechSynthesis.getVoices(); | |
return t && Object.keys(l).forEach(n=>{ | |
e[n] = { | |
language: { | |
name: l[n], | |
displayName: "" | |
}, | |
voices: t.filter(e=>e.lang.startsWith(n) && !1 === e.name.startsWith("Google")) | |
} | |
} | |
), | |
e | |
} | |
, p = e=>{ | |
const t = h(); | |
let n = []; | |
return Object.keys(t).forEach(r=>{ | |
n = n.concat(t[r].voices.filter(t=>t.lang.endsWith(e))) | |
} | |
), | |
n | |
} | |
, m = e=>{ | |
const t = h(); | |
let n = []; | |
return Object.keys(t).forEach(r=>{ | |
n = n.concat(t[r].voices.filter(t=>t.lang.startsWith(e))) | |
} | |
), | |
n | |
} | |
; | |
class b extends EventTarget { | |
constructor() { | |
super(), | |
r(this, "_continuationHelper", ()=>{ | |
!0 === this._isSpeaking && (this._shouldContinue = !0, | |
this._utterance.addEventListener("end", this.continuationHandler, !1), | |
this.stop()) | |
} | |
), | |
r(this, "resumeHelper", e=>{ | |
this._shouldResumeBeHandledByUs = !0; | |
const t = this._chromeCharIndexHelper > 0 ? this._chromeCharIndexHelper : e.charIndex | |
, n = this._currentText.substring(t); | |
this._charIndexOffsetOriginalText = this._originalText.search(n), | |
this._currentText = this._originalText.substring(this._charIndexOffsetOriginalText), | |
this._utterance.removeEventListener("end", this.resumeHelper, !1), | |
this._isResumeHelperRegistered = !1 | |
} | |
), | |
r(this, "_dispatchCustomEvent", (e,t)=>{ | |
const n = new CustomEvent(e,{ | |
detail: t | |
}); | |
this.dispatchEvent(n) | |
} | |
), | |
r(this, "onBoundary", e=>{ | |
this._dispatchCustomEvent(i.PROGRESS, { | |
charIndex: this._charIndexOffsetOriginalText + e.charIndex, | |
charLength: e.charLength, | |
progress: (this._charIndexOffsetOriginalText + e.charIndex) / this._originalText.length, | |
utteredWord: this._currentText.substring(e.charIndex, e.charIndex + e.charLength) | |
}), | |
Modernizr.ischrome && (this._chromeCharIndexHelper = e.charIndex) | |
} | |
), | |
r(this, "onPause", e=>{ | |
this._dispatchCustomEvent(i.PAUSE, { | |
charIndex: e.charIndex | |
}) | |
} | |
), | |
r(this, "onResume", e=>{ | |
this._dispatchCustomEvent(i.RESUME, { | |
charIndex: e.charIndex | |
}) | |
} | |
), | |
r(this, "onEnd", e=>{ | |
!1 === this._isPaused && (this.stop(), | |
this._dispatchCustomEvent(i.END, {})) | |
} | |
), | |
r(this, "continuationHandler", e=>{ | |
const t = this._chromeCharIndexHelper > 0 ? this._chromeCharIndexHelper : e.charIndex | |
, n = this._currentText.substring(t); | |
this._charIndexOffsetOriginalText = this._originalText.search(n), | |
this._currentText = this._originalText.substring(this._charIndexOffsetOriginalText), | |
!1 === this._isPaused && this.speak(), | |
this._utterance.removeEventListener(e.type, this.continuationHandler, !1) | |
} | |
), | |
r(this, "speak", ()=>{ | |
!0 === this._isSpeaking && this.stop(), | |
!1 !== c(this._currentText) ? this._voice ? (this._utterance = new window.SpeechSynthesisUtterance, | |
this._utterance.text = this._currentText, | |
this._utterance.voice = this._voice, | |
this._utterance.lang = this._voice.lang, | |
this._utterance.rate = this._rate, | |
this._utterance.pitch = this._pitch, | |
this._utterance.addEventListener("boundary", this.onBoundary, !1), | |
this._utterance.addEventListener("pause", this.onPause, !1), | |
this._utterance.addEventListener("resume", this.onResume, !1), | |
this._utterance.addEventListener("end", this.onEnd, !1), | |
window.speechSynthesis.speak(this._utterance), | |
this._isSpeaking = !0, | |
this._isPaused = !1, | |
this._dispatchCustomEvent(i.START, { | |
text: this._currentText | |
})) : console.warn("[Text to Speech] No voice has been selected to utter this text. Aborting!") : console.warn("[Text to Speech] Either no text has been set that can be spoken or the text is not valid. Aborting!") | |
} | |
), | |
r(this, "pause", ()=>{ | |
this._isResumeHelperRegistered || (this._utterance.addEventListener("end", this.resumeHelper, !1), | |
this._isResumeHelperRegistered = !0), | |
window.speechSynthesis.pause(), | |
this._isPaused = !0 | |
} | |
), | |
r(this, "resume", ()=>{ | |
this._isPaused = !1, | |
!0 === this._shouldResumeBeHandledByUs ? (this.stop(), | |
this.speak()) : window.speechSynthesis.resume() | |
} | |
), | |
r(this, "stop", ()=>{ | |
this._utterance.removeEventListener("boundary", this.onBoundary, !1), | |
this._utterance.removeEventListener("pause", this.onPause, !1), | |
this._utterance.removeEventListener("resume", this.onResume, !1), | |
this._utterance.removeEventListener("end", this.onEnd, !1), | |
this._utterance.removeEventListener("end", this.resumeHelper, !1), | |
window.speechSynthesis.cancel(), | |
!1 === this._shouldResumeBeHandledByUs && (this._charIndexOffsetOriginalText = 0), | |
this._isSpeaking = !1, | |
this._isPaused = !1, | |
this._shouldResumeBeHandledByUs = !1, | |
this._isResumeHelperRegistered = !1, | |
this._shouldContinue = !1 | |
} | |
), | |
r(this, "setText", e=>{ | |
!1 !== c(e) ? this._originalText = this._currentText = e : console.warn("[Text to Speech] Trying to set invalid/empty text failed") | |
} | |
), | |
r(this, "setVoice", e=>{ | |
!e || !1 === Modernizr.ischrome && e.constructor !== SpeechSynthesisVoice ? console.warn(`[Text to Speech] Voice ${e} is not a valid SpeechSynthesisVoice object.`) : (this._voice = e, | |
this._continuationHelper()) | |
} | |
), | |
r(this, "setRate", e=>{ | |
Object.values(o).indexOf(e) < 0 ? console.warn(`[Text to Speech] Rate ${e} is not supported.`) : (this._rate = e, | |
this._continuationHelper()) | |
} | |
), | |
r(this, "setPitch", e=>{ | |
Object.values(s).indexOf(e) < 0 ? console.warn(`[Text to Speech] Pitch ${e} is not supported.`) : (this._pitch = e, | |
this._continuationHelper()) | |
} | |
), | |
this._utterance = null, | |
this._originalText = this._currentText = "", | |
this._voice = null, | |
this._rate = a, | |
this._pitch = u, | |
this._isSpeaking = !1, | |
this._isPaused = !1, | |
this._charIndexOffsetOriginalText = 0, | |
this._shouldContinue = !1, | |
this._shouldResumeBeHandledByUs = !1, | |
this._isResumeHelperRegistered = !1, | |
this._chromeCharIndexHelper = 0 | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-shared/services/URLManager.js": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
function(e) { | |
n.d(t, "createBlob", (function() { | |
return u | |
} | |
)), | |
n.d(t, "exists", (function() { | |
return l | |
} | |
)), | |
n.d(t, "getURL", (function() { | |
return c | |
} | |
)), | |
n.d(t, "getKeyForURL", (function() { | |
return d | |
} | |
)), | |
n.d(t, "isStoredURL", (function() { | |
return f | |
} | |
)), | |
n.d(t, "createURL", (function() { | |
return h | |
} | |
)), | |
n.d(t, "fetchURL", (function() { | |
return p | |
} | |
)), | |
n.d(t, "revokeURL", (function() { | |
return m | |
} | |
)), | |
n.d(t, "revokeAllURLs", (function() { | |
return b | |
} | |
)); | |
n("./node_modules/core-js/modules/web.url.js"); | |
const r = "object" == typeof window && (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder) || null | |
, i = "object" == typeof window && (window.URL || window.webkitURL) || "object" == typeof e && e.URL || null | |
, o = "object" == typeof window && window.Blob || "object" == typeof e && e.Blob || null | |
, s = null !== i && (null !== o || null !== r) | |
, a = {}; | |
function u(e, t) { | |
if ("[object Blob]" === Object.prototype.toString.call(e)) | |
return e; | |
try { | |
return new o([e],{ | |
type: t | |
}) | |
} catch (i) { | |
if ("InvalidStateError" === i.name) | |
return new o([e.buffer],{ | |
type: t | |
}); | |
if ("TypeError" === i.name && r) { | |
var n = new r; | |
return n.append([e.buffer]), | |
n.getBlob(t) | |
} | |
return null | |
} | |
} | |
function l(e) { | |
return e in a | |
} | |
function c(e) { | |
return a[e] | |
} | |
function d(e) { | |
for (var t in a) | |
if (a[t] === e) | |
return t; | |
return null | |
} | |
function f(e) { | |
return e && null !== d(e) | |
} | |
function h(e, t, n) { | |
if (!s) | |
return a[e] = e, | |
a[e]; | |
if (e in a) | |
return a[e]; | |
var r = u(t, n); | |
return r ? a[e] = i.createObjectURL(r) : (console.warn("Can't create Blob from data " + e), | |
null) | |
} | |
function p(e, t, n) { | |
if (!s) | |
return Promise.resolve(null); | |
if (e in a) | |
return Promise.resolve(a[e]); | |
var r = u(t, n); | |
if (!r) | |
return console.warn("Can't create Blob from data " + e), | |
Promise.resolve(null); | |
var o = i.createObjectURL(r); | |
return a[e] = o, | |
Promise.resolve(o) | |
} | |
function m(e) { | |
s && e in a && (i.revokeObjectURL(a[e]), | |
delete a[e]) | |
} | |
function b() { | |
if (s) | |
for (var e in a) | |
i.revokeObjectURL(a[e]), | |
delete a[e] | |
} | |
} | |
.call(this, n("./node_modules/webpack/buildin/global.js")) | |
}, | |
"./musketeer/modules/tolino-shared/services/zip/ByteArray.js": function(e, t, n) { | |
"use strict"; | |
n("./node_modules/core-js/modules/es.typed-array.uint8-array.js"), | |
n("./node_modules/core-js/modules/es.typed-array.uint16-array.js"); | |
let r = {}; | |
const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" | |
, o = "function" == typeof TextDecoder ? new TextDecoder("utf-8") : null | |
, s = "function" == typeof TextDecoder ? new TextDecoder("utf-16") : null; | |
let a; | |
try { | |
String.fromCharCode.apply(null, new Uint8Array(new ArrayBuffer(1))), | |
a = !0 | |
} catch (e) { | |
a = !1 | |
} | |
function u(e) { | |
return e && 239 === e[0] && 187 === e[1] && 191 === e[2] | |
} | |
function l(e, t, n) { | |
let r = ""; | |
const i = e && e.subarray || Array.prototype.slice; | |
let o, s; | |
void 0 === n && (n = e && e.length || 0); | |
for (let a = t || 0; a < n; a += 65536) | |
o = Math.min(a + 65536, n), | |
s = i.call(e, a, o), | |
r += String.fromCharCode.apply(null, s); | |
return r | |
} | |
r.hasUTF16ByteOrderMark = function(e) { | |
return e && (255 === e[0] && 254 === e[1] || 254 === e[0] && 255 === e[1]) | |
} | |
, | |
r.asNumber = function(e) { | |
let t = 0; | |
for (let n = e.length - 1; n >= 0; n--) { | |
let r = e[n]; | |
t = (t << 8) + (r < 0 ? r + 256 : r) | |
} | |
return t | |
} | |
, | |
r.asBase64 = function(e) { | |
if (window.btoa) | |
return btoa(l(e)); | |
let t = u(e) ? 3 : 0; | |
const n = [] | |
, r = e ? e.length : 0 | |
, o = r % 3 | |
, s = r - o; | |
let a, c, d, f, h; | |
for (; t < s; t += 3) | |
h = e[t] << 16 | e[t + 1] << 8 | e[t + 2], | |
a = (16515072 & h) >> 18, | |
c = (258048 & h) >> 12, | |
d = (4032 & h) >> 6, | |
f = 63 & h, | |
n.push(i[a], i[c], i[d], i[f]); | |
return o > 0 && (1 === o ? (h = e[s], | |
a = (252 & h) >> 2, | |
c = (3 & h) << 4, | |
d = 64) : (h = e[s] << 8 | e[s + 1], | |
a = (16128 & h) >> 8, | |
c = (1008 & h) >> 4, | |
d = (15 & h) << 2), | |
n.push(i[a], i[c], i[d], i[64])), | |
n.join("") | |
} | |
, | |
r.asUTF8String = o ? e=>o.decode(e) : e=>{ | |
let t, n, r = u(e) ? 3 : 0; | |
const i = e && e.length || 0; | |
let o = 0; | |
const s = a ? new Uint16Array(new ArrayBuffer(2 * i)) : new Array(i); | |
for (; r < i; r++) | |
t = e[r], | |
t < 128 ? s[o++] = t : t >= 194 && t < 224 ? s[o++] = ((31 & t) << 6) + (63 & e[++r]) : t >= 224 && t < 240 ? s[o++] = ((255 & t) << 12) + ((63 & e[++r]) << 6) + (63 & e[++r]) : t >= 240 && t < 245 && (n = ((7 & t) << 18) + ((63 & e[++r]) << 12) + ((63 & e[++r]) << 6) + (63 & e[++r]) - 65536, | |
s[o++] = 55296 + (n >> 10), | |
s[o++] = 56320 + (1023 & n)); | |
return l(s, 0, o) | |
} | |
, | |
r.asUTF16String = s ? e=>s.decode(e) : e=>{ | |
let t = 0 | |
, n = 1 | |
, r = 0; | |
254 === e[0] && 255 === e[1] ? (t = 2, | |
n = 0, | |
r = 1) : 255 === e[0] && 254 === e[1] && (t = 2); | |
let i = 0; | |
const o = e.length | |
, s = a ? new Uint16Array(new ArrayBuffer(o)) : new Array(Math.ceil(o / 2)); | |
for (; t < o; t += 2) | |
s[i++] = (e[t + n] << 8) + e[t + r]; | |
return l(s, 0, i) | |
} | |
, | |
t.a = r | |
}, | |
"./musketeer/modules/tolino-shared/services/zip/zip.worker.js": function(e, t, n) { | |
e.exports = function() { | |
return new Worker(n.p + "zip.worker.js") | |
} | |
}, | |
"./musketeer/modules/tolino-sync/index.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return g | |
} | |
)); | |
var r = n("./musketeer/modules/tolino-shared/index.js") | |
, i = n("./musketeer/modules/tolino-cloud/index.js") | |
, o = n("./musketeer/modules/async-storage/index.js"); | |
const s = window.tolino.config | |
, a = r.j.NET.METADATA | |
, u = a.SYNC_PATH | |
, l = Object.values(u) | |
, c = { | |
[u.BOOKMARK]: "bookmark", | |
[u.COMMENT]: "comments", | |
[u.DOGEAR]: "dogears", | |
[u.TAG]: "tags" | |
} | |
, d = {}; | |
l.forEach(e=>{ | |
d[e] = Object.keys(a.SYNC_VALUES[e]) | |
} | |
); | |
let f = null; | |
const h = { | |
lastSyncTime: 0, | |
revision: null | |
} | |
, p = e=>Boolean(e); | |
function m(e, t) { | |
h.lastSyncTime = e, | |
h.revision = t | |
} | |
function b() { | |
f = null | |
} | |
function g() { | |
return (e,t)=>{ | |
if (f) | |
return f; | |
const n = t(); | |
if (!n.user.userId) | |
return Promise.reject("demo mode"); | |
const a = n.inventory | |
, u = a.entitlements | |
, l = a.sync || { | |
lastSyncTime: 0, | |
revision: null | |
} | |
, c = []; | |
m(l.lastSyncTime, l.revision); | |
for (let e in u) | |
c.push.apply(c, y(u[e], l.lastSyncTime)); | |
return f = Object(i.h)(e, t, l.revision, c).then(n=>j(e, t, n)).then(n=>function(e, t, n) { | |
e({ | |
type: "UPDATE_META_DATA", | |
metaData: t, | |
sync: { | |
lastSyncTime: r.r.getTime(), | |
revision: h.revision | |
} | |
}), | |
n().user.userId && (o.a.setItem("bookshelf", n().inventory, s.BOOKSHELFSTORE), | |
console.info("stored rev in bookshelf")) | |
}(e, n, t)).catch(O).finally(b) | |
} | |
} | |
function y(e, t) { | |
const n = []; | |
return l.forEach(r=>{ | |
const i = e[c[r]]; | |
if (i) { | |
const o = r === u.BOOKMARK ? _ : S; | |
n.push.apply(n, o(e.id, e.type, i, t, r)) | |
} | |
} | |
), | |
n | |
} | |
function v(e) { | |
return e && "AUDIOBOOK" === e.category ? "/audiobooks" : "/publications" | |
} | |
function _(e, t, n, r) { | |
if (n && n.modified) { | |
if (!n.rmsdkPosition) | |
return console.warn(e + " has a bookmark without position " + v(t)), | |
[]; | |
if (!n.id && n.rmsdkPosition) | |
return w(n, e, t, a.SYNC_OP.ADD); | |
if (n.id && n.modified > r) | |
return w(n, e, t, a.SYNC_OP.REPLACE) | |
} | |
return [] | |
} | |
function w(e, t, n, r) { | |
var i = u.BOOKMARK | |
, o = { | |
op: r, | |
value: {} | |
}; | |
return d[i].forEach(t=>{ | |
o.value[t] = e[a.SYNC_VALUES[i][t]] || (t in a.SYNC_DEFAULTS[i] ? a.SYNC_DEFAULTS[i][t] : null) | |
} | |
), | |
o.path = v(n) + "/" + t + i, | |
r !== a.SYNC_OP.ADD && (o.path += "/" + e.id), | |
[o] | |
} | |
function S(e, t, n, r, i) { | |
return n.map(n=>n.id ? n.deleted ? E(n, e, t, i, a.SYNC_OP.REMOVE) : n.modified > r && E(n, e, t, i, a.SYNC_OP.REPLACE) : !n.deleted && E(n, e, t, i, a.SYNC_OP.ADD)).filter(p) | |
} | |
function E(e, t, n, i, o) { | |
if (!i) | |
return void console.error("Sync error. No syncPath given"); | |
if (i === a.SYNC_PATH.TAG && (e.category === r.j.MISC.SUBSCRIPTION_CATEGORY || e.name === r.j.NET.METADATA.TAG_FAMILY_SHARING_EBOOK) || e.name === r.j.NET.METADATA.TAG_FAMILY_SHARING_AUDIO) | |
return null; | |
let s = { | |
op: o, | |
path: v(n) + "/" + t + i, | |
value: {} | |
}; | |
if (d[i].forEach(t=>{ | |
s.value[t] = e[a.SYNC_VALUES[i][t]] || null | |
} | |
), | |
o === a.SYNC_OP.ADD) { | |
let t = i === u.COMMENT ? e.rmsdkPosition + e.endPosition : i === u.DOGEAR ? e.rmsdkPosition : i === u.TAG ? e.name : ""; | |
e.transientId = s.value.transientId = (l = t, | |
r.t.encodeBase64(r.t.encodeURIComponent(l))) | |
} else | |
s.path += "/" + e.id; | |
var l; | |
return s | |
} | |
function j(e, t, n, r={}) { | |
if (n) { | |
h.revision = n.revision, | |
function(e, t={}, n) { | |
const r = e=>"bookmark" !== e | |
, i = (e,t)=>e.transientId === t && !e.id && !e.deleted; | |
function o(e) { | |
const t = {} | |
, n = e.patch.value | |
, r = e.path; | |
return d[r].forEach(e=>{ | |
t[a.SYNC_VALUES[r][e]] = n[e] | |
} | |
), | |
t.id = e.id, | |
t | |
} | |
function s(t, n) { | |
const r = e[t]; | |
r.forEach((e,t)=>{ | |
e && e.id === n && delete r[t] | |
} | |
) | |
} | |
for (let u in e) { | |
let l = t[u] || {} | |
, d = n[u] || (n[u] = {}); | |
e[u].forEach(e=>{ | |
if (!e.id) | |
return void console.warn("remote patch without id", e); | |
const t = c[e.path] | |
, n = e.patch.value.transientId; | |
if (r(t)) { | |
let r; | |
const c = d[t] || (d[t] = (f = l[t]) ? f.slice() : []); | |
if (n && (r = c.findIndex(e=>i(e, n))) >= 0) | |
return void c.splice(r, 1, o(e)); | |
if (e.patch.op === a.SYNC_OP.REMOVE) | |
return r = c.findIndex(t=>t.id === e.id), | |
void (r >= 0 && (c.splice(r, 1), | |
s(u, e.id))); | |
(r = c.findIndex(t=>t.id === e.id)) >= 0 ? c.splice(r, 1, o(e)) : c.push(o(e)) | |
} else { | |
if (n && d[t] && i(d[t], n)) | |
return void (d[t] = o(e)); | |
const r = d[t] && d[t].id; | |
void 0 !== r && r !== e.id || (e.patch.op === a.SYNC_OP.REMOVE ? (d[t] = {}, | |
s(u, e.id), | |
console.info("mergeRemotePatches: REMOVE on", e.path, "for entitlement", u, e)) : d[t] = o(e)) | |
} | |
var f | |
} | |
) | |
} | |
}(function(e=[]) { | |
const t = {}; | |
return e.forEach(e=>{ | |
const n = x(e.path) | |
, r = n.pubId; | |
if (r) { | |
const i = { | |
id: n.unitId, | |
path: n.path, | |
patch: e | |
}; | |
r in t ? t[r].push(i) : t[r] = [i] | |
} | |
} | |
), | |
t | |
}(n.patches), t().inventory.entitlements, r) | |
} | |
return function(e, t, n, r) { | |
const o = []; | |
if ((n && n.conflicts || []).forEach(e=>{ | |
e.clientInfo.pathObject = x(e.clientState.path), | |
e.serverInfo.pathObject = x(e.serverState.path); | |
const n = function(e, t) { | |
const n = e.clientState | |
, r = e.serverState | |
, i = (e,t)=>e.value.modified > t.value.modified ? e : t; | |
if (n.op === a.SYNC_OP.REMOVE) | |
return r; | |
if (r.op === a.SYNC_OP.REMOVE) | |
return n; | |
switch (e.clientInfo.pathObject.path) { | |
case u.COMMENT: | |
return function(e, t) { | |
const n = e.value | |
, r = t.value; | |
return n.startPosition !== r.startPosition || n.endPosition !== r.endPosition ? i(e, t) : (n.note = n.note + r.note, | |
e) | |
}(n, r); | |
case u.TAG: | |
case u.DOGEAR: | |
return i(n, r); | |
case u.BOOKMARK: | |
return e.serverInfo.pathObject.pubId === t().inventory.currentDeliverable ? null : i(n, r) | |
} | |
}(e, t); | |
n && o.push(n) | |
} | |
), | |
o.length > 0) | |
return Object(i.h)(e, t, h.revision, o).then(n=>(console.info("%cRESOLVECONFLICTS: SOLUTIONS = %o RESPONSEDATA = %o", "color: #f90", o, n.data), | |
j(e, t, n.data, r)), O); | |
return Promise.resolve(r) | |
}(e, t, n, r) | |
} | |
function x(e) { | |
const t = e.split("/").filter(p); | |
return { | |
type: t[0], | |
pubId: t[1], | |
path: "/" + t[2], | |
unitId: t[3] | |
} | |
} | |
function O(e) { | |
return console.warn("onSyncError:", e), | |
m(0, null), | |
Promise.resolve({}) | |
} | |
}, | |
"./musketeer/modules/tolino-user/actions.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "b", (function() { | |
return u | |
} | |
)), | |
n.d(t, "a", (function() { | |
return l | |
} | |
)), | |
n.d(t, "e", (function() { | |
return h | |
} | |
)), | |
n.d(t, "c", (function() { | |
return m | |
} | |
)), | |
n.d(t, "d", (function() { | |
return b | |
} | |
)); | |
var r = n("./musketeer/modules/async-storage/index.js") | |
, i = n("./node_modules/crypto-js/index.js") | |
, o = n.n(i); | |
n("./node_modules/core-js/modules/es.string.replace.js"), | |
n("./node_modules/core-js/modules/es.typed-array.uint8-array.js"); | |
var s = n("./musketeer/modules/tolino-cloud/bookshelf.js") | |
, a = n("./musketeer/modules/tolino-global/settings.actions.js"); | |
const u = "SET_USER_INFOS" | |
, l = "PURGE_USER" | |
, c = window.tolino.config; | |
function d(e) { | |
return { | |
type: u, | |
value: e | |
} | |
} | |
async function f(e, t=1e4) { | |
const n = new Promise((e,n)=>{ | |
setTimeout(()=>{ | |
n(new Error("Request Timeout")) | |
} | |
, t) | |
} | |
); | |
return Promise.race([n, e]) | |
} | |
async function h(e, t) { | |
const n = "tolino Webreader " + window.tolino.config.VERSION.OFFICIAL; | |
let r = await f(fetch(t.resellerInfo.config.URL_BOOKSHELF + "v2/registerhw", { | |
method: "POST", | |
headers: new Headers({ | |
hardware_id: e, | |
reseller_id: t.resellerInfo.config.reseller_id, | |
client_type: t.resellerInfo.config.client_type, | |
client_version: window.tolino.config.VERSION.OFFICIAL, | |
hardware_type: t.resellerInfo.config.client_type, | |
Accept: "application/json", | |
"Content-Type": "application/json", | |
t_auth_token: t.token.access | |
}), | |
body: JSON.stringify({ | |
hardware_name: n | |
}) | |
})); | |
if (r.ok) | |
return r.json(); | |
if (406 === parseInt(r.status, 10)) | |
throw new Error(c.ERROR.DEVICE_LIMIT); | |
throw console.error(r.error && r.error()), | |
new Error(c.ERROR.NETWORK_BOSH_FAIL) | |
} | |
async function p(e, t) { | |
let n = null | |
, i = null | |
, u = null; | |
const p = t(); | |
try { | |
let e = await r.a.getItem("userInfos", c.USERSTORE); | |
if (!e) | |
throw new Error(c.ERROR.APP_NO_STORED_USER); | |
{ | |
const t = o.a.AES.decrypt(e, c.VERSION.PHRASE).toString(o.a.enc.Utf8); | |
u = JSON.parse(t), | |
n = u.userId, | |
i = u.hardwareId | |
} | |
} catch (e) { | |
console.warn(e && e.message), | |
n = null, | |
i = null | |
} | |
if (i) { | |
let o = null; | |
try { | |
if (t().token.isDemo) | |
throw new Error("NO_USER_CHECK_WITH_DEMO_TOKEN"); | |
o = await async function(e, t) { | |
let n = await f(fetch(t.resellerInfo.config.URL_BOOKSHELF + "userid/" + window.encodeURIComponent(e), { | |
method: "GET", | |
headers: new Headers({ | |
reseller_id: t.resellerInfo.config.reseller_id, | |
Accept: "application/json", | |
"Content-Type": "application/json", | |
t_auth_token: t.token.access | |
}) | |
})); | |
if (n.ok) | |
return await n.json(); | |
throw new Error(n) | |
}(i, p) | |
} catch (t) { | |
return console.warn(t && t.message), | |
o = null, | |
e(d(u)) | |
} | |
if (n === (o && o.initAppResponse && o.initAppResponse.userId)) | |
return e(d(u)); | |
{ | |
console.warn("Different user found. Clearing stores !"), | |
await r.a.removeItem("userInfos", c.USERSTORE), | |
n = null, | |
i = null; | |
const o = Object(a.a)(); | |
await Object(s.b)(e, t), | |
await o(e, t), | |
await r.a.clear(c.PUBSTORE), | |
e({ | |
type: l | |
}) | |
} | |
} | |
if (!n && t().token.isDemo) | |
throw new Error(c.ERROR.APP_NO_USER); | |
i = await async function() { | |
return new Promise((function(e) { | |
e(([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, e=>(e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> e / 4).toString(16))) | |
} | |
)) | |
}(); | |
let m = null; | |
if (m = await h(i, p), | |
m && m.initAppResponse) { | |
return e(d(await async function(e, t) { | |
const n = { | |
userId: e.userId, | |
devKey: e.deviceKey, | |
hardwareId: t | |
} | |
, i = o.a.AES.encrypt(JSON.stringify(n), c.VERSION.PHRASE).toString(); | |
return await r.a.setItem("userInfos", i, c.USERSTORE), | |
n | |
}(m.initAppResponse, i))) | |
} | |
throw new Error(c.ERROR.APP_INVALID_USER) | |
} | |
function m() { | |
return function(e, t) { | |
return p(e, t) | |
} | |
} | |
function b() { | |
return async(e,t)=>{ | |
var n; | |
await r.a.removeItem("userInfos", c.USERSTORE), | |
await r.a.clear(c.USERSTORE), | |
await (n = t(), | |
f(fetch(n.resellerInfo.config.URL_BOOKSHELF + "handshake/devices/delete", { | |
method: "POST", | |
headers: new Headers({ | |
reseller_id: n.resellerInfo.config.reseller_id, | |
Accept: "application/json", | |
"Content-Type": "application/json", | |
t_auth_token: n.token.access | |
}), | |
body: JSON.stringify({ | |
deleteDevicesRequest: { | |
accounts: [{ | |
auth_token: n.token.access, | |
reseller_id: n.resellerInfo.config.reseller_id | |
}], | |
devices: [{ | |
device_id: n.user.hardwareId, | |
reseller_id: n.resellerInfo.config.reseller_id | |
}] | |
} | |
}) | |
}), 2e3)), | |
e({ | |
type: l | |
}) | |
} | |
} | |
}, | |
"./musketeer/modules/tolino-user/reducer.js": function(e, t, n) { | |
"use strict"; | |
n("./musketeer/modules/async-storage/index.js"); | |
var r = n("./musketeer/modules/tolino-user/actions.js"); | |
const i = Object.freeze({}); | |
t.a = (e=i,t)=>{ | |
switch (t.type) { | |
case r.b: | |
return t.value; | |
case r.a: | |
return i; | |
default: | |
return e | |
} | |
} | |
}, | |
"./musketeer/themes/theme-base/colors.ts": function(e, t) {}, | |
"./musketeer/themes/theme-base/fonts.ts": function(e, t) {}, | |
"./musketeer/themes/theme-base/index.ts": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return u | |
} | |
)); | |
n("./musketeer/themes/theme-base/colors.ts"), | |
n("./musketeer/themes/theme-base/variables.ts"), | |
n("./musketeer/themes/theme-base/fonts.ts"); | |
var r, i = n("./node_modules/react/index.js"), o = n("./node_modules/react-fela/es/index.js"); | |
function s(e, t, n, i) { | |
r || (r = "function" == typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103); | |
var o = e && e.defaultProps | |
, s = arguments.length - 3; | |
if (t || 0 === s || (t = { | |
children: void 0 | |
}), | |
1 === s) | |
t.children = i; | |
else if (s > 1) { | |
for (var a = new Array(s), u = 0; u < s; u++) | |
a[u] = arguments[u + 3]; | |
t.children = a | |
} | |
if (t && o) | |
for (var l in o) | |
void 0 === t[l] && (t[l] = o[l]); | |
else | |
t || (t = o || {}); | |
return { | |
$$typeof: r, | |
type: e, | |
key: void 0 === n ? null : "" + n, | |
ref: null, | |
props: t, | |
_owner: null | |
} | |
} | |
const a = {}; | |
function u(e, t) { | |
return Object(o.e)(class extends i.Component { | |
render() { | |
const n = JSON.stringify(t); | |
if (!a[n]) { | |
const {theme: e} = this.props | |
, r = Object.assign({}, e); | |
Object.keys(t).forEach(e=>{ | |
r[e] = r[e] || {}; | |
const n = r[e] | |
, i = t[e]; | |
Object.keys(i).forEach(e=>{ | |
n[e] || (n[e] = i[e]) | |
} | |
) | |
} | |
), | |
a[n] = r | |
} | |
return s(o.b, { | |
theme: a[n] | |
}, void 0, i.createElement(e, this.props)) | |
} | |
} | |
) | |
} | |
}, | |
"./musketeer/themes/theme-base/variables.ts": function(e, t) {}, | |
"./musketeer/themes/tolinode/colors.js": function(e, t, n) { | |
"use strict"; | |
t.a = { | |
primary: "rgb(255, 255, 255)", | |
primaryAccented: "rgb(243, 247, 251)", | |
black: "rgb( 0, 0, 0)", | |
primaryIcon: "rgb( 51, 51, 51)", | |
primaryText: "rgb( 76, 76, 76)", | |
secondary: "rgb(153, 153, 153)", | |
tertiary: "rgb(178, 178, 178)", | |
disabled: "rgb(204, 204, 204)", | |
divider: "rgb(224, 224, 224)", | |
accent: "rgb( 70, 152, 203)", | |
yellow: "rgb(255, 246, 168)", | |
red: "rgb(255, 0, 0)", | |
critical: "rgb(226, 0, 14)", | |
orange: "rgb(227, 82, 5)", | |
black12: "rgba( 0, 0, 0, 0.12)", | |
black20: "rgba( 0, 0, 0, 0.20)", | |
black30: "rgba( 0, 0, 0, 0.30)", | |
black50: "rgba( 0, 0, 0, 0.50)", | |
black40: "rgba( 0, 0, 0, 0.40)", | |
black70: "rgba( 0, 0, 0, 0.70)", | |
black80: "rgba( 0, 0, 0, 0.80)", | |
accent12: "rgba( 70, 152, 203, 0.12)", | |
accent25: "rgba( 70, 152, 203, 0.25)", | |
accent50: "rgba( 70, 152, 203, 0.50)", | |
accent75: "rgba( 70, 152, 203, 0.70)", | |
accentNightDivider: "rgb(107, 173, 213)", | |
white: "rgb(255, 255, 255)", | |
white80: "rgba(255, 255, 255, 0.80)", | |
primaryAccented80: "rgba(243, 247, 251, 0.80)", | |
lightBlue: "rgb(231, 242, 248)", | |
mediumBlue: "rgb(162, 203, 229)", | |
nightUI: "rgb( 37, 37, 37)", | |
nightPrimary: "rgb(211, 211, 211)", | |
nightSecondary: "rgb(124, 124, 124)", | |
nightTertiary: "rgb(103, 103, 103)", | |
nightDisabled: "rgb( 81, 81, 81)", | |
nightDivider: "rgb( 64, 64, 64)", | |
sepia: "rgb(234, 221, 199)", | |
sepiaText: "rgb( 61, 43, 29)", | |
yellowSepia: "rgb(247, 232, 146)", | |
yellowNight: "rgb(153, 144, 66)", | |
dropShadow: "rgba(0, 0, 0, 0.2)", | |
transparent: "rgba(255, 255, 255, 0)", | |
dropShadowGridViewItem: "rgba(0, 0, 0, 0.12)" | |
} | |
}, | |
"./musketeer/themes/tolinode/mixins.js": function(e, t, n) { | |
"use strict"; | |
n.d(t, "a", (function() { | |
return s | |
} | |
)); | |
var r = n("./musketeer/components/UIPrimitives/Platform.js") | |
, i = n("./musketeer/themes/tolinode/colors.js") | |
, o = n("./musketeer/themes/tolinode/variables.js"); | |
class s { | |
static fontFace(e, t, n="normal", i="normal") { | |
const o = "assets/fonts/"; | |
switch (r.a.OS) { | |
case "android": | |
case "ios": | |
return { | |
fontFamily: t, | |
fontWeight: n, | |
fontStyle: i | |
}; | |
default: | |
return { | |
fontFamily: e, | |
src: ['url("' + o + t + '.eot")', 'url("' + o + t + '.eot?#iefix") format("embedded-opentype")', 'url("' + o + t + '.woff") format("woff")', 'url("' + o + t + '.otf") format("truetype")', 'url("' + o + t + ".svg##" + e + '") format("svg")', 'url("' + o + t + '.otf") format("opentype")'], | |
fontWeight: n, | |
fontStyle: i | |
} | |
} | |
} | |
static textEllipsis() { | |
return { | |
overflow: "hidden !important", | |
textOverflow: "ellipsis !important", | |
whiteSpace: "nowrap !important" | |
} | |
} | |
static fullWidthHeight() { | |
return { | |
height: "100%", | |
width: "100%" | |
} | |
} | |
static centerOnScreen() { | |
return { | |
left: "50%", | |
position: "absolute", | |
top: "50%", | |
transform: "translate(-50%, -50%)" | |
} | |
} | |
static resellerLogo(e) { | |
return { | |
backgroundImage: 'url("assets/logos/logo-' + e + '.png")', | |
backgroundPosition: "50% 50%", | |
backgroundRepeat: "no-repeat", | |
backgroundSize: "contain" | |
} | |
} | |
static scrollable(e) { | |
let t = { | |
overflowScrolling: "touch", | |
"-webkit-overflow-scrolling": "touch", | |
"::-webkit-scrollbar": { | |
display: "block", | |
height: "10px", | |
width: "10px" | |
}, | |
"::-webkit-scrollbar-thumb": { | |
backgroundClip: "padding-box", | |
backgroundColor: i.a.divider, | |
border: "3px solid " + i.a.transparent, | |
borderRadius: "5px", | |
height: "3px" | |
}, | |
"::-webkit-scrollbar-track": { | |
display: "none" | |
} | |
}; | |
return e && ("both" === e ? t.overflow = "auto" : t["overflow-" + e] = "auto"), | |
t | |
} | |
static userSelect(e) { | |
return { | |
userSelect: e ? "text" : "none" | |
} | |
} | |
static navigationDrawerHelper() { | |
return { | |
display: "flex", | |
height: "100%", | |
marginLeft: 35 * o.a.basicUnit, | |
overflow: "hidden", | |
position: "relative", | |
transition: "margin-left " + o.a.animationDuration + " " + o.a.animationEasing, | |
["@media " + o.a.MQ_0_767]: { | |
marginLeft: 0 | |
} | |
} | |
} | |
static navigationDrawerIconHelper() { | |
return { | |
display: "none", | |
["@media " + o.a.MQ_0_767]: { | |
display: "inherit" | |
} | |
} | |
} | |
static globalPaddingHelper({axis: e, maxFactor: t, minFactor: n}={}) { | |
return this.globalSizeHelper("padding", e, t, n) | |
} | |
static globalMarginHelper({axis: e, maxFactor: t, minFactor: n}={}) { | |
return this.globalSizeHelper("margin", e, t, n) | |
} | |
static globalSizeHelper(e, t, n, r) { | |
const i = "b" === (t = t || "both") || "y" === t || "both" === t | |
, s = "l" === t || "x" === t || "both" === t | |
, a = "r" === t || "x" === t || "both" === t | |
, u = "t" === t || "y" === t || "both" === t; | |
n = n || 4, | |
r = r || 0; | |
const l = Math.min(n, Math.max(r, 1)) | |
, c = Math.min(n, Math.max(r, 2)) | |
, d = Math.min(n, Math.max(r, 3)) | |
, f = Math.min(n, Math.max(r, 3)) | |
, h = "padding" === e ? "paddingBottom" : "marginBottom" | |
, p = "padding" === e ? "paddingLeft" : "marginLeft" | |
, m = "padding" === e ? "paddingRight" : "marginRight" | |
, b = "padding" === e ? "paddingTop" : "marginTop"; | |
return { | |
[h]: i ? n * o.a.basicUnit : null, | |
[p]: s ? n * o.a.basicUnit : null, | |
[m]: a ? n * o.a.basicUnit : null, | |
[b]: u ? n * o.a.basicUnit : null, | |
["@media " + o.a.MQ_0_479]: { | |
[h]: i ? l * o.a.basicUnit : null, | |
[p]: s ? l * o.a.basicUnit : null, | |
[m]: a ? l * o.a.basicUnit : null, | |
[b]: u ? l * o.a.basicUnit : null | |
}, | |
["@media " + o.a.MQ_480_767]: { | |
[h]: i ? c * o.a.basicUnit : null, | |
[p]: s ? c * o.a.basicUnit : null, | |
[m]: a ? c * o.a.basicUnit : null, | |
[b]: u ? c * o.a.basicUnit : null | |
}, | |
["@media " + o.a.MQ_768_1023]: { | |
[h]: i ? d * o.a.basicUnit : null, | |
[p]: s ? d * o.a.basicUnit : null, | |
[m]: a ? d * o.a.basicUnit : null, | |
[b]: u ? d * o.a.basicUnit : null | |
}, | |
["@media " + o.a.MQ_1024_1199]: { | |
[h]: i ? f * o.a.basicUnit : null, | |
[p]: s ? f * o.a.basicUnit : null, | |
[m]: a ? f * o.a.basicUnit : null, | |
[b]: u ? f * o.a.basicUnit : null | |
} | |
} | |
} | |
static hasTouch() { | |
return "ontouchstart"in document.documentElement || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 | |
} | |
} | |
}, | |
"./musketeer/themes/tolinode/variables.js": function(e, t, n) { | |
"use strict"; | |
var r = n("./musketeer/themes/tolinode/colors.js"); | |
var i = { | |
uiPublicationCoverContainerHeight: 227, | |
uiPublicationCoverContainerHeightSmall: 205, | |
uiPublicationCoverContainerWidth: 150, | |
uiPublicationCoverContainerWidthSmall: 134, | |
uiPublicationCoverContainerMargin: 3, | |
uiPublicationCoverNewBadgeSize: 86, | |
uiPublicationCoverDownloadBadgeSize: 48, | |
uiPublicationCoverBorrowedBadgeWidth: 78, | |
uiPublicationCoverBorrowedBadgeHeight: 22, | |
uiPublicationCoverImageMinHeight: 94, | |
uiCoverImageMinHeightPercent: 40, | |
uiCoverMinWidth: 144, | |
uiCoverMinHeight: 224, | |
uiCoverMinWidthSmall: 120, | |
uiCoverMinHeightSmall: 187, | |
uiGridPadding: 24, | |
uiGridPaddingSmall: 16, | |
uiGridDescriptionHeight: 70, | |
uiPublicationGridContainerHeight: 317, | |
uiPublicationGridContainerHeightSmall: 295, | |
uiPublicationGridContainerWidth: 192, | |
uiPublicationGridContainerWidthSmall: 160, | |
uiPublicationGridCoverTop: 21, | |
uiPublicationGridCoverHorizontal: 21, | |
uiPublicationGridCoverHorizontalSmall: 13, | |
uiPublicationGridDescriptionContainerHeight: 63, | |
uiPublicationGridDescriptionContainerHorizontal: 24, | |
uiPublicationGridDescriptionContainerHorizontalSmall: 15, | |
uiAudioBookCoverContainerHeight: 147, | |
uiAudioBookCoverContainerHeightSmall: 131, | |
uiAudioBookCoverContainerWidth: 150, | |
uiAudioBookCoverContainerWidthSmall: 134, | |
uiAudioBookCoverContainerMargin: 3, | |
uiAudioBookCoverNewBadgeSize: 86, | |
uiAudioBookCoverDownloadBadgeSize: 48, | |
uiAudioBookCoverAudioBadgeSize: 32, | |
uiAudioBookCoverImageMinHeight: 94, | |
uiAudioBookGridContainerHeight: 237, | |
uiAudioBookGridContainerHeightSmall: 221, | |
uiAudioBookGridContainerWidth: 192, | |
uiAudioBookGridContainerWidthSmall: 160, | |
uiAudioBookGridCoverTop: 21, | |
uiAudioBookGridCoverHorizontal: 21, | |
uiAudioBookGridCoverHorizontalSmall: 13, | |
uiAudioBookGridDescriptionContainerHeight: 59, | |
uiAudioBookGridDescriptionContainerHorizontal: 24, | |
uiAudioBookGridDescriptionContainerHorizontalSmall: 15, | |
uiProgressBarContainerWidth: 150, | |
uiProgressBarContainerWidthSmall: 127, | |
uiProgressBarContainerHeight: 15, | |
uiProgressBarWidth: 120, | |
uiProgressBarWidthSmall: 99, | |
uiProgressBarHeight: 4, | |
uiProgressBarTextContainerWidth: 29, | |
uiProgressBarTextContainerWidthSmall: 25, | |
uiProgressBarTextContainerMarginLeft: 3, | |
uiProgressBarTextContainerMarginLeftSmall: 5, | |
uiProgressSpinnerRadius: 11, | |
uiProgressSpinnerBorderRadius: 2, | |
uiProgressSpinnerIconArrowSize: 24, | |
uiProgressSpinnerIconStopSize: 6, | |
uiLibraryListItemHeight: 108, | |
uiLibraryListItemMinHeightSmall: 96, | |
uiLibraryListItemMaxHeightSmall: 116, | |
uiLibraryListItemImageContainerPublicationHeight: 85, | |
uiLibraryListItemImageContainerAudioBookHeight: 55, | |
uiLibraryListItemImageContainerWidth: 55, | |
uiLibraryListItemImageContainerMarginHorizontal: 24, | |
uiLibraryListItemImageContainerPublicationMarginBottom: 11, | |
uiLibraryListItemImageContainerAudioBookMarginBottom: 27, | |
uiLibraryListItemImageContainerPublicationHeight: 85, | |
uiLibraryListItemImageContainerAudioBookHeight: 55, | |
uiLibraryListItemImageContainerWidth: 55, | |
uiLibraryListItemImageContainerMarginHorizontal: 24, | |
uiLibraryListItemImageContainerPublicationMarginBottom: 11, | |
uiLibraryListItemImageContainerAudioBookMarginBottom: 27, | |
uiLibraryListItemImageContainerSmallPublicationHeight: 62, | |
uiLibraryListItemImageContainerSmallAudioBookHeight: 40, | |
uiLibraryListItemImageContainerSmallWidth: 40, | |
uiLibraryListItemImageContainerSmallMarginHorizontal: 16, | |
uiLibraryListItemImageContainerSmallMarginBottom: 15, | |
uiLibraryListItemInfoContainer: 15, | |
uiLibraryListItemLeftContainerMarginVertical: 10, | |
uiLibraryListCollectionItemHeight: 108, | |
uiLibraryListCollectionItemHeightSmall: 72, | |
uiLibraryListCollectionItemImageContainerWidth: 70, | |
uiLibraryListCollectionItemImageContainerMarginHorizontal: 24, | |
uiLibraryListCollectionItemImageContainerPublicationMarginBottom: 11, | |
uiLibraryListCollectionItemImageContainerAudioBookMarginBottom: 27, | |
uiLibraryListCollectionItemCoverPublicationWidth: 54, | |
uiLibraryListCollectionItemCoverPublicationHeight: 84, | |
uiLibraryListCollectionItemCoverAudioBookWidth: 54, | |
uiLibraryListCollectionItemCoverAudioBookHeight: 54, | |
uiLibraryListCollectionItemCoverSmallPublicationWidth: 35, | |
uiLibraryListCollectionItemCoverSmallPublicationHeight: 54, | |
uiLibraryListCollectionItemCoverSmallAudioBookWidth: 35, | |
uiLibraryListCollectionItemCoverSmallAudioBookHeight: 35, | |
uiLibraryListCollectionItemImageContainerMarginHorizontal: 24, | |
uiLibraryListCollectionItemImageContainerSmallMarginHorizontal: 16, | |
uiLibraryListCollectionItemInfoContainer: 15, | |
uiRecommendationGridCoverContainerTop: 24, | |
uiRecommendationGridCoverContainerLeft: 16, | |
uiRecommendationGridCoverContainerRight: 16, | |
uiRecommendationGridCoverDescriptionHeight: 69, | |
uiImageCarousselMinHeight: 250, | |
uiImageCarousselMaxHeight: 500, | |
uiPublicationCollectionGridContainerHeight: 317, | |
uiPublicationCollectionGridContainerHeightSmall: 257, | |
uiPublicationCollectionGridContainerWidth: 238, | |
uiPublicationCollectionGridContainerWidthSmall: 160, | |
uiCollectionGridContainerWidth: 226, | |
uiCollectionGridContainerWidthSmall: 152, | |
uiPublicationCollectionGridCoverHeight: 227, | |
uiPublicationCollectionGridCoverHeightSmall: 162, | |
uiPublicationCollectionGridCoverWidth: 150, | |
uiPublicationCollectionGridCoverWidthSmall: 104, | |
uiPublicationCollectionGridCoverTop: 10, | |
uiPublicationCollectionGridDescriptionContainerHeight: 57, | |
uiPublicationCollectionGridDescriptionContainerHorizontal: 24.5, | |
uiPublicationCollectionGridDescriptionContainerHorizontalSmall: 12, | |
uiAudioBookCollectionGridContainerHeight: 237, | |
uiAudioBookCollectionGridContainerHeightSmall: 199, | |
uiAudioBookCollectionGridContainerWidth: 238, | |
uiAudioBookCollectionGridContainerWidthSmall: 160, | |
uiAudioBookCollectionGridCoverHeight: 144, | |
uiAudioBookCollectionGridCoverHeightSmall: 104, | |
uiAudioBookCollectionGridCoverWidth: 144, | |
uiAudioBookCollectionGridCoverWidthSmall: 104, | |
uiAudioBookCollectionGridCoverTop: 10, | |
uiAudioBookCollectionGridDescriptionContainerHeight: 57, | |
uiAudioBookCollectionGridDescriptionContainerHorizontal: 24.5, | |
uiAudioBookCollectionGridDescriptionContainerHorizontalSmall: 12, | |
uiAuthorListItemHeight: 88, | |
uiAuthorListItemHeightNative: 72, | |
uiAuthorListItemMarginHorizontal: 24, | |
uiAuthorListItemMarginHorizontalNative: 16, | |
uiAuthorListItemAuthorNameMarginTop: 25, | |
uiAuthorListItemAuthorNameMarginTopNative: 19, | |
uiAuthorListItemEntitlementsMarginTop: 48, | |
uiAuthorListItemEntitlementsMarginTopNative: 42, | |
uiFamilyListItemHeight: 48, | |
uiFamilyListItemLeftContainerMarginVertical: 10 | |
}; | |
const o = "0 2px 20px " + r.a.dropShadow | |
, s = "0 1px 2px " + r.a.dropShadow | |
, a = "0 2px 4px " + r.a.dropShadow | |
, u = "0 3px 6px " + r.a.dropShadow | |
, l = "0 4px 8px " + r.a.dropShadow | |
, c = "4px 4px 12px " + r.a.dropShadowGridViewItem; | |
t.a = { | |
MQ_0_319: "screen and (min-width: 0px) and (max-width: 319px)", | |
MQ_0_479: "screen and (min-width: 0px) and (max-width: 479px)", | |
MQ_0_767: "screen and (min-width: 0px) and (max-width: 767px)", | |
MQ_0_1023: "screen and (min-width: 0px) and (max-width: 1023px)", | |
MQ_320_479: "screen and (min-width: 320px) and (max-width: 479px)", | |
MQ_480_767: "screen and (min-width: 480px) and (max-width: 767px)", | |
MQ_768_1023: "screen and (min-width: 768px) and (max-width: 1023px)", | |
MQ_1024_1199: "screen and (min-width: 1024px) and (max-width: 1199px)", | |
MQ_1024: "screen and (min-width: 1024px)", | |
basicUnit: 8, | |
animationDuration: ".2s", | |
animationEasing: "ease-in-out", | |
dropShadow: o, | |
dropShadowButton: s, | |
dropShadowButtonHover: a, | |
dropShadowButtonFloating: u, | |
dropShadowButtonFloatingHover: l, | |
dropShadowGridViewItem: c, | |
dropShadowNavTappable: "0 1px 4px rgba(114,114,114,0.5)", | |
fontSizeDefault: 1, | |
fontSizeHeader1: 4.4, | |
fontSizeHeader2: 3.6, | |
fontSizeTitle: 2.7, | |
fontSizeBody: 1.8, | |
fontSizeBodyLarge: 2, | |
fontSizeSmall: 1.5, | |
fontSizeCaption: 1.3, | |
fontSizeIllustration: 7.5, | |
lineHeight: 1.5, | |
lineHeightSmall: 1, | |
lineHeightLarge: 1.25, | |
zIndexDrawer: 999999, | |
zIndexModalBlocker: 1e6, | |
zIndexModalBlockerContent: 1000001, | |
zIndexModalBlockerContentImportant: 1000002, | |
zIndexToolbarRoot: 1e5, | |
zIndexToolbarChild: 100001, | |
uiIconInnerSize: 24, | |
uiIconWidth: 48, | |
uiIconHeight: 48, | |
uiIconPadding: 12, | |
uiIconMarginLeftRight: 1, | |
uiHeaderBarHeight: 64, | |
uiHeaderBarHeightSmall: 48, | |
uiFooterHeight: 88, | |
uiFooterPaddingSmall: 48, | |
uiNavTappableSize: 55, | |
uiContextMenuButtonContainerSize: 36, | |
uiContextMenuButtonContainerBorderRadius: 20, | |
uiContextMenuButtonWidth: 3, | |
uiContextMenuButtonHeight: 17, | |
uiContextMenuButtonWidthiOS: 17, | |
uiContextMenuButtonHeightiOS: 3, | |
uiContextMenuButtonPadding: 18, | |
uiContextMenuDialogContainerMinWidth: 120, | |
uiContextMenuDialogContainerMaxWidth: 192, | |
uiContextMenuDialogContainerBorderRadius: 16, | |
uiContextMenuDialogListItemContainerHeight: 36, | |
uiContextMenuDialogListItemContainerPaddingHorizontal: 16, | |
uiGridViewMarginTop: 16, | |
uiGridViewMarginTopNative: 0, | |
uiGridViewMarginLeft: 8, | |
uiGridViewMarginLeftNative: 0, | |
uiAuthorListMarginLeft: 8, | |
uiTabBarContainerMarginLeft: 20, | |
uiTabBarContainerBorderWidth: 1, | |
uiTabBarItemPaddingHorizontal: 12, | |
uiTabBarItemHeight: 48, | |
uiTabBarItemSelectedHeight: 2, | |
uiSelectBoxItemHeaderHeight: 36, | |
uiSelectBoxItemHeaderPaddingHorizontal: 16, | |
uiSelectBoxItemHeaderBorderRadius: 20, | |
uiSelectBoxItemListContainerMinWidth: 200, | |
uiSelectBoxItemListContainerBorderRadius: 16, | |
uiSelectBoxItemListItemContainerHeight: 36, | |
uiSelectBoxItemListItemContainerPaddingHorizontal: 16, | |
uiSelectBoxItemListItemToggleIconSize: 25, | |
uiTextDialogContainerMarginHorizontal: 20, | |
uiTextDialogContainerMarginVertical: 22, | |
uiTextDialogContainerMaxWidth: "90%", | |
uiTextDialogDescriptionContainerMarginTop: 11, | |
uiTextDialogDescriptionContainerMinHeight: 50, | |
uiTextDialogDescriptionContainerMaxHeight: "80%", | |
uiTextDialogButtonBarContainerMarginTop: 36, | |
uiTextDialogButtonMarginHorizontal: 4, | |
...i | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js": function(e, t) { | |
e.exports = function(e, t) { | |
(null == t || t > e.length) && (t = e.length); | |
for (var n = 0, r = new Array(t); n < t; n++) | |
r[n] = e[n]; | |
return r | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/arrayWithHoles.js": function(e, t) { | |
e.exports = function(e) { | |
if (Array.isArray(e)) | |
return e | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/classCallCheck.js": function(e, t) { | |
e.exports = function(e, t) { | |
if (!(e instanceof t)) | |
throw new TypeError("Cannot call a class as a function") | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/createClass.js": function(e, t) { | |
function n(e, t) { | |
for (var n = 0; n < t.length; n++) { | |
var r = t[n]; | |
r.enumerable = r.enumerable || !1, | |
r.configurable = !0, | |
"value"in r && (r.writable = !0), | |
Object.defineProperty(e, r.key, r) | |
} | |
} | |
e.exports = function(e, t, r) { | |
return t && n(e.prototype, t), | |
r && n(e, r), | |
e | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/defineProperty.js": function(e, t) { | |
e.exports = function(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
if (void 0 === e) | |
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
return e | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": function(e, t, n) { | |
"use strict"; | |
function r(e, t) { | |
if (!(e instanceof t)) | |
throw new TypeError("Cannot call a class as a function") | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/createClass.js": function(e, t, n) { | |
"use strict"; | |
function r(e, t) { | |
for (var n = 0; n < t.length; n++) { | |
var r = t[n]; | |
r.enumerable = r.enumerable || !1, | |
r.configurable = !0, | |
"value"in r && (r.writable = !0), | |
Object.defineProperty(e, r.key, r) | |
} | |
} | |
function i(e, t, n) { | |
return t && r(e.prototype, t), | |
n && r(e, n), | |
e | |
} | |
n.d(t, "a", (function() { | |
return i | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/defineProperty.js": function(e, t, n) { | |
"use strict"; | |
function r(e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/extends.js": function(e, t, n) { | |
"use strict"; | |
function r() { | |
return (r = Object.assign || function(e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) | |
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
} | |
).apply(this, arguments) | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return (r = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { | |
return e.__proto__ || Object.getPrototypeOf(e) | |
} | |
)(e) | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js": function(e, t, n) { | |
"use strict"; | |
function r(e, t) { | |
e.prototype = Object.create(t.prototype), | |
e.prototype.constructor = e, | |
e.__proto__ = t | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": function(e, t, n) { | |
"use strict"; | |
function r(e, t) { | |
if (null == e) | |
return {}; | |
var n, r, i = {}, o = Object.keys(e); | |
for (r = 0; r < o.length; r++) | |
n = o[r], | |
t.indexOf(n) >= 0 || (i[n] = e[n]); | |
return i | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": function(e, t, n) { | |
"use strict"; | |
function r(e, t) { | |
return (r = Object.setPrototypeOf || function(e, t) { | |
return e.__proto__ = t, | |
e | |
} | |
)(e, t) | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/esm/typeof.js": function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
return typeof e | |
} | |
: function(e) { | |
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e | |
} | |
)(e) | |
} | |
n.d(t, "a", (function() { | |
return r | |
} | |
)) | |
}, | |
"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": function(e, t) { | |
e.exports = function(e, t) { | |
if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) { | |
var n = [] | |
, r = !0 | |
, i = !1 | |
, o = void 0; | |
try { | |
for (var s, a = e[Symbol.iterator](); !(r = (s = a.next()).done) && (n.push(s.value), | |
!t || n.length !== t); r = !0) | |
; | |
} catch (e) { | |
i = !0, | |
o = e | |
} finally { | |
try { | |
r || null == a.return || a.return() | |
} finally { | |
if (i) | |
throw o | |
} | |
} | |
return n | |
} | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/nonIterableRest.js": function(e, t) { | |
e.exports = function() { | |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js": function(e, t, n) { | |
var r = n("./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"); | |
e.exports = function(e, t) { | |
if (null == e) | |
return {}; | |
var n, i, o = r(e, t); | |
if (Object.getOwnPropertySymbols) { | |
var s = Object.getOwnPropertySymbols(e); | |
for (i = 0; i < s.length; i++) | |
n = s[i], | |
t.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n]) | |
} | |
return o | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js": function(e, t) { | |
e.exports = function(e, t) { | |
if (null == e) | |
return {}; | |
var n, r, i = {}, o = Object.keys(e); | |
for (r = 0; r < o.length; r++) | |
n = o[r], | |
t.indexOf(n) >= 0 || (i[n] = e[n]); | |
return i | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/slicedToArray.js": function(e, t, n) { | |
var r = n("./node_modules/@babel/runtime/helpers/arrayWithHoles.js") | |
, i = n("./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js") | |
, o = n("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js") | |
, s = n("./node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
e.exports = function(e, t) { | |
return r(e) || i(e, t) || o(e, t) || s() | |
} | |
}, | |
"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": function(e, t, n) { | |
var r = n("./node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
e.exports = function(e, t) { | |
if (e) { | |
if ("string" == typeof e) | |
return r(e, t); | |
var n = Object.prototype.toString.call(e).slice(8, -1); | |
return "Object" === n && e.constructor && (n = e.constructor.name), | |
"Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0 | |
} | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1.js": function(e, t, n) { | |
"use strict"; | |
const r = t; | |
r.bignum = n("./node_modules/bn.js/lib/bn.js"), | |
r.define = n("./node_modules/asn1.js/lib/asn1/api.js").define, | |
r.base = n("./node_modules/asn1.js/lib/asn1/base/index.js"), | |
r.constants = n("./node_modules/asn1.js/lib/asn1/constants/index.js"), | |
r.decoders = n("./node_modules/asn1.js/lib/asn1/decoders/index.js"), | |
r.encoders = n("./node_modules/asn1.js/lib/asn1/encoders/index.js") | |
}, | |
"./node_modules/asn1.js/lib/asn1/api.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/asn1.js/lib/asn1/encoders/index.js") | |
, i = n("./node_modules/asn1.js/lib/asn1/decoders/index.js") | |
, o = n("./node_modules/inherits/inherits_browser.js"); | |
function s(e, t) { | |
this.name = e, | |
this.body = t, | |
this.decoders = {}, | |
this.encoders = {} | |
} | |
t.define = function(e, t) { | |
return new s(e,t) | |
} | |
, | |
s.prototype._createNamed = function(e) { | |
const t = this.name; | |
function n(e) { | |
this._initNamed(e, t) | |
} | |
return o(n, e), | |
n.prototype._initNamed = function(t, n) { | |
e.call(this, t, n) | |
} | |
, | |
new n(this) | |
} | |
, | |
s.prototype._getDecoder = function(e) { | |
return e = e || "der", | |
this.decoders.hasOwnProperty(e) || (this.decoders[e] = this._createNamed(i[e])), | |
this.decoders[e] | |
} | |
, | |
s.prototype.decode = function(e, t, n) { | |
return this._getDecoder(t).decode(e, n) | |
} | |
, | |
s.prototype._getEncoder = function(e) { | |
return e = e || "der", | |
this.encoders.hasOwnProperty(e) || (this.encoders[e] = this._createNamed(r[e])), | |
this.encoders[e] | |
} | |
, | |
s.prototype.encode = function(e, t, n) { | |
return this._getEncoder(t).encode(e, n) | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1/base/buffer.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/inherits/inherits_browser.js") | |
, i = n("./node_modules/asn1.js/lib/asn1/base/reporter.js").Reporter | |
, o = n("./node_modules/safer-buffer/safer.js").Buffer; | |
function s(e, t) { | |
i.call(this, t), | |
o.isBuffer(e) ? (this.base = e, | |
this.offset = 0, | |
this.length = e.length) : this.error("Input not Buffer") | |
} | |
function a(e, t) { | |
if (Array.isArray(e)) | |
this.length = 0, | |
this.value = e.map((function(e) { | |
return a.isEncoderBuffer(e) || (e = new a(e,t)), | |
this.length += e.length, | |
e | |
} | |
), this); | |
else if ("number" == typeof e) { | |
if (!(0 <= e && e <= 255)) | |
return t.error("non-byte EncoderBuffer value"); | |
this.value = e, | |
this.length = 1 | |
} else if ("string" == typeof e) | |
this.value = e, | |
this.length = o.byteLength(e); | |
else { | |
if (!o.isBuffer(e)) | |
return t.error("Unsupported type: " + typeof e); | |
this.value = e, | |
this.length = e.length | |
} | |
} | |
r(s, i), | |
t.DecoderBuffer = s, | |
s.isDecoderBuffer = function(e) { | |
if (e instanceof s) | |
return !0; | |
return "object" == typeof e && o.isBuffer(e.base) && "DecoderBuffer" === e.constructor.name && "number" == typeof e.offset && "number" == typeof e.length && "function" == typeof e.save && "function" == typeof e.restore && "function" == typeof e.isEmpty && "function" == typeof e.readUInt8 && "function" == typeof e.skip && "function" == typeof e.raw | |
} | |
, | |
s.prototype.save = function() { | |
return { | |
offset: this.offset, | |
reporter: i.prototype.save.call(this) | |
} | |
} | |
, | |
s.prototype.restore = function(e) { | |
const t = new s(this.base); | |
return t.offset = e.offset, | |
t.length = this.offset, | |
this.offset = e.offset, | |
i.prototype.restore.call(this, e.reporter), | |
t | |
} | |
, | |
s.prototype.isEmpty = function() { | |
return this.offset === this.length | |
} | |
, | |
s.prototype.readUInt8 = function(e) { | |
return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !0) : this.error(e || "DecoderBuffer overrun") | |
} | |
, | |
s.prototype.skip = function(e, t) { | |
if (!(this.offset + e <= this.length)) | |
return this.error(t || "DecoderBuffer overrun"); | |
const n = new s(this.base); | |
return n._reporterState = this._reporterState, | |
n.offset = this.offset, | |
n.length = this.offset + e, | |
this.offset += e, | |
n | |
} | |
, | |
s.prototype.raw = function(e) { | |
return this.base.slice(e ? e.offset : this.offset, this.length) | |
} | |
, | |
t.EncoderBuffer = a, | |
a.isEncoderBuffer = function(e) { | |
if (e instanceof a) | |
return !0; | |
return "object" == typeof e && "EncoderBuffer" === e.constructor.name && "number" == typeof e.length && "function" == typeof e.join | |
} | |
, | |
a.prototype.join = function(e, t) { | |
return e || (e = o.alloc(this.length)), | |
t || (t = 0), | |
0 === this.length || (Array.isArray(this.value) ? this.value.forEach((function(n) { | |
n.join(e, t), | |
t += n.length | |
} | |
)) : ("number" == typeof this.value ? e[t] = this.value : "string" == typeof this.value ? e.write(this.value, t) : o.isBuffer(this.value) && this.value.copy(e, t), | |
t += this.length)), | |
e | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1/base/index.js": function(e, t, n) { | |
"use strict"; | |
const r = t; | |
r.Reporter = n("./node_modules/asn1.js/lib/asn1/base/reporter.js").Reporter, | |
r.DecoderBuffer = n("./node_modules/asn1.js/lib/asn1/base/buffer.js").DecoderBuffer, | |
r.EncoderBuffer = n("./node_modules/asn1.js/lib/asn1/base/buffer.js").EncoderBuffer, | |
r.Node = n("./node_modules/asn1.js/lib/asn1/base/node.js") | |
}, | |
"./node_modules/asn1.js/lib/asn1/base/node.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/asn1.js/lib/asn1/base/reporter.js").Reporter | |
, i = n("./node_modules/asn1.js/lib/asn1/base/buffer.js").EncoderBuffer | |
, o = n("./node_modules/asn1.js/lib/asn1/base/buffer.js").DecoderBuffer | |
, s = n("./node_modules/minimalistic-assert/index.js") | |
, a = ["seq", "seqof", "set", "setof", "objid", "bool", "gentime", "utctime", "null_", "enum", "int", "objDesc", "bitstr", "bmpstr", "charstr", "genstr", "graphstr", "ia5str", "iso646str", "numstr", "octstr", "printstr", "t61str", "unistr", "utf8str", "videostr"] | |
, u = ["key", "obj", "use", "optional", "explicit", "implicit", "def", "choice", "any", "contains"].concat(a); | |
function l(e, t, n) { | |
const r = {}; | |
this._baseState = r, | |
r.name = n, | |
r.enc = e, | |
r.parent = t || null, | |
r.children = null, | |
r.tag = null, | |
r.args = null, | |
r.reverseArgs = null, | |
r.choice = null, | |
r.optional = !1, | |
r.any = !1, | |
r.obj = !1, | |
r.use = null, | |
r.useDecoder = null, | |
r.key = null, | |
r.default = null, | |
r.explicit = null, | |
r.implicit = null, | |
r.contains = null, | |
r.parent || (r.children = [], | |
this._wrap()) | |
} | |
e.exports = l; | |
const c = ["enc", "parent", "children", "tag", "args", "reverseArgs", "choice", "optional", "any", "obj", "use", "alteredUse", "key", "default", "explicit", "implicit", "contains"]; | |
l.prototype.clone = function() { | |
const e = this._baseState | |
, t = {}; | |
c.forEach((function(n) { | |
t[n] = e[n] | |
} | |
)); | |
const n = new this.constructor(t.parent); | |
return n._baseState = t, | |
n | |
} | |
, | |
l.prototype._wrap = function() { | |
const e = this._baseState; | |
u.forEach((function(t) { | |
this[t] = function() { | |
const n = new this.constructor(this); | |
return e.children.push(n), | |
n[t].apply(n, arguments) | |
} | |
} | |
), this) | |
} | |
, | |
l.prototype._init = function(e) { | |
const t = this._baseState; | |
s(null === t.parent), | |
e.call(this), | |
t.children = t.children.filter((function(e) { | |
return e._baseState.parent === this | |
} | |
), this), | |
s.equal(t.children.length, 1, "Root node can have only one child") | |
} | |
, | |
l.prototype._useArgs = function(e) { | |
const t = this._baseState | |
, n = e.filter((function(e) { | |
return e instanceof this.constructor | |
} | |
), this); | |
e = e.filter((function(e) { | |
return !(e instanceof this.constructor) | |
} | |
), this), | |
0 !== n.length && (s(null === t.children), | |
t.children = n, | |
n.forEach((function(e) { | |
e._baseState.parent = this | |
} | |
), this)), | |
0 !== e.length && (s(null === t.args), | |
t.args = e, | |
t.reverseArgs = e.map((function(e) { | |
if ("object" != typeof e || e.constructor !== Object) | |
return e; | |
const t = {}; | |
return Object.keys(e).forEach((function(n) { | |
n == (0 | n) && (n |= 0); | |
const r = e[n]; | |
t[r] = n | |
} | |
)), | |
t | |
} | |
))) | |
} | |
, | |
["_peekTag", "_decodeTag", "_use", "_decodeStr", "_decodeObjid", "_decodeTime", "_decodeNull", "_decodeInt", "_decodeBool", "_decodeList", "_encodeComposite", "_encodeStr", "_encodeObjid", "_encodeTime", "_encodeNull", "_encodeInt", "_encodeBool"].forEach((function(e) { | |
l.prototype[e] = function() { | |
const t = this._baseState; | |
throw new Error(e + " not implemented for encoding: " + t.enc) | |
} | |
} | |
)), | |
a.forEach((function(e) { | |
l.prototype[e] = function() { | |
const t = this._baseState | |
, n = Array.prototype.slice.call(arguments); | |
return s(null === t.tag), | |
t.tag = e, | |
this._useArgs(n), | |
this | |
} | |
} | |
)), | |
l.prototype.use = function(e) { | |
s(e); | |
const t = this._baseState; | |
return s(null === t.use), | |
t.use = e, | |
this | |
} | |
, | |
l.prototype.optional = function() { | |
return this._baseState.optional = !0, | |
this | |
} | |
, | |
l.prototype.def = function(e) { | |
const t = this._baseState; | |
return s(null === t.default), | |
t.default = e, | |
t.optional = !0, | |
this | |
} | |
, | |
l.prototype.explicit = function(e) { | |
const t = this._baseState; | |
return s(null === t.explicit && null === t.implicit), | |
t.explicit = e, | |
this | |
} | |
, | |
l.prototype.implicit = function(e) { | |
const t = this._baseState; | |
return s(null === t.explicit && null === t.implicit), | |
t.implicit = e, | |
this | |
} | |
, | |
l.prototype.obj = function() { | |
const e = this._baseState | |
, t = Array.prototype.slice.call(arguments); | |
return e.obj = !0, | |
0 !== t.length && this._useArgs(t), | |
this | |
} | |
, | |
l.prototype.key = function(e) { | |
const t = this._baseState; | |
return s(null === t.key), | |
t.key = e, | |
this | |
} | |
, | |
l.prototype.any = function() { | |
return this._baseState.any = !0, | |
this | |
} | |
, | |
l.prototype.choice = function(e) { | |
const t = this._baseState; | |
return s(null === t.choice), | |
t.choice = e, | |
this._useArgs(Object.keys(e).map((function(t) { | |
return e[t] | |
} | |
))), | |
this | |
} | |
, | |
l.prototype.contains = function(e) { | |
const t = this._baseState; | |
return s(null === t.use), | |
t.contains = e, | |
this | |
} | |
, | |
l.prototype._decode = function(e, t) { | |
const n = this._baseState; | |
if (null === n.parent) | |
return e.wrapResult(n.children[0]._decode(e, t)); | |
let r, i = n.default, s = !0, a = null; | |
if (null !== n.key && (a = e.enterKey(n.key)), | |
n.optional) { | |
let r = null; | |
if (null !== n.explicit ? r = n.explicit : null !== n.implicit ? r = n.implicit : null !== n.tag && (r = n.tag), | |
null !== r || n.any) { | |
if (s = this._peekTag(e, r, n.any), | |
e.isError(s)) | |
return s | |
} else { | |
const r = e.save(); | |
try { | |
null === n.choice ? this._decodeGeneric(n.tag, e, t) : this._decodeChoice(e, t), | |
s = !0 | |
} catch (e) { | |
s = !1 | |
} | |
e.restore(r) | |
} | |
} | |
if (n.obj && s && (r = e.enterObject()), | |
s) { | |
if (null !== n.explicit) { | |
const t = this._decodeTag(e, n.explicit); | |
if (e.isError(t)) | |
return t; | |
e = t | |
} | |
const r = e.offset; | |
if (null === n.use && null === n.choice) { | |
let t; | |
n.any && (t = e.save()); | |
const r = this._decodeTag(e, null !== n.implicit ? n.implicit : n.tag, n.any); | |
if (e.isError(r)) | |
return r; | |
n.any ? i = e.raw(t) : e = r | |
} | |
if (t && t.track && null !== n.tag && t.track(e.path(), r, e.length, "tagged"), | |
t && t.track && null !== n.tag && t.track(e.path(), e.offset, e.length, "content"), | |
n.any || (i = null === n.choice ? this._decodeGeneric(n.tag, e, t) : this._decodeChoice(e, t)), | |
e.isError(i)) | |
return i; | |
if (n.any || null !== n.choice || null === n.children || n.children.forEach((function(n) { | |
n._decode(e, t) | |
} | |
)), | |
n.contains && ("octstr" === n.tag || "bitstr" === n.tag)) { | |
const r = new o(i); | |
i = this._getUse(n.contains, e._reporterState.obj)._decode(r, t) | |
} | |
} | |
return n.obj && s && (i = e.leaveObject(r)), | |
null === n.key || null === i && !0 !== s ? null !== a && e.exitKey(a) : e.leaveKey(a, n.key, i), | |
i | |
} | |
, | |
l.prototype._decodeGeneric = function(e, t, n) { | |
const r = this._baseState; | |
return "seq" === e || "set" === e ? null : "seqof" === e || "setof" === e ? this._decodeList(t, e, r.args[0], n) : /str$/.test(e) ? this._decodeStr(t, e, n) : "objid" === e && r.args ? this._decodeObjid(t, r.args[0], r.args[1], n) : "objid" === e ? this._decodeObjid(t, null, null, n) : "gentime" === e || "utctime" === e ? this._decodeTime(t, e, n) : "null_" === e ? this._decodeNull(t, n) : "bool" === e ? this._decodeBool(t, n) : "objDesc" === e ? this._decodeStr(t, e, n) : "int" === e || "enum" === e ? this._decodeInt(t, r.args && r.args[0], n) : null !== r.use ? this._getUse(r.use, t._reporterState.obj)._decode(t, n) : t.error("unknown tag: " + e) | |
} | |
, | |
l.prototype._getUse = function(e, t) { | |
const n = this._baseState; | |
return n.useDecoder = this._use(e, t), | |
s(null === n.useDecoder._baseState.parent), | |
n.useDecoder = n.useDecoder._baseState.children[0], | |
n.implicit !== n.useDecoder._baseState.implicit && (n.useDecoder = n.useDecoder.clone(), | |
n.useDecoder._baseState.implicit = n.implicit), | |
n.useDecoder | |
} | |
, | |
l.prototype._decodeChoice = function(e, t) { | |
const n = this._baseState; | |
let r = null | |
, i = !1; | |
return Object.keys(n.choice).some((function(o) { | |
const s = e.save() | |
, a = n.choice[o]; | |
try { | |
const n = a._decode(e, t); | |
if (e.isError(n)) | |
return !1; | |
r = { | |
type: o, | |
value: n | |
}, | |
i = !0 | |
} catch (t) { | |
return e.restore(s), | |
!1 | |
} | |
return !0 | |
} | |
), this), | |
i ? r : e.error("Choice not matched") | |
} | |
, | |
l.prototype._createEncoderBuffer = function(e) { | |
return new i(e,this.reporter) | |
} | |
, | |
l.prototype._encode = function(e, t, n) { | |
const r = this._baseState; | |
if (null !== r.default && r.default === e) | |
return; | |
const i = this._encodeValue(e, t, n); | |
return void 0 === i || this._skipDefault(i, t, n) ? void 0 : i | |
} | |
, | |
l.prototype._encodeValue = function(e, t, n) { | |
const i = this._baseState; | |
if (null === i.parent) | |
return i.children[0]._encode(e, t || new r); | |
let o = null; | |
if (this.reporter = t, | |
i.optional && void 0 === e) { | |
if (null === i.default) | |
return; | |
e = i.default | |
} | |
let s = null | |
, a = !1; | |
if (i.any) | |
o = this._createEncoderBuffer(e); | |
else if (i.choice) | |
o = this._encodeChoice(e, t); | |
else if (i.contains) | |
s = this._getUse(i.contains, n)._encode(e, t), | |
a = !0; | |
else if (i.children) | |
s = i.children.map((function(n) { | |
if ("null_" === n._baseState.tag) | |
return n._encode(null, t, e); | |
if (null === n._baseState.key) | |
return t.error("Child should have a key"); | |
const r = t.enterKey(n._baseState.key); | |
if ("object" != typeof e) | |
return t.error("Child expected, but input is not object"); | |
const i = n._encode(e[n._baseState.key], t, e); | |
return t.leaveKey(r), | |
i | |
} | |
), this).filter((function(e) { | |
return e | |
} | |
)), | |
s = this._createEncoderBuffer(s); | |
else if ("seqof" === i.tag || "setof" === i.tag) { | |
if (!i.args || 1 !== i.args.length) | |
return t.error("Too many args for : " + i.tag); | |
if (!Array.isArray(e)) | |
return t.error("seqof/setof, but data is not Array"); | |
const n = this.clone(); | |
n._baseState.implicit = null, | |
s = this._createEncoderBuffer(e.map((function(n) { | |
const r = this._baseState; | |
return this._getUse(r.args[0], e)._encode(n, t) | |
} | |
), n)) | |
} else | |
null !== i.use ? o = this._getUse(i.use, n)._encode(e, t) : (s = this._encodePrimitive(i.tag, e), | |
a = !0); | |
if (!i.any && null === i.choice) { | |
const e = null !== i.implicit ? i.implicit : i.tag | |
, n = null === i.implicit ? "universal" : "context"; | |
null === e ? null === i.use && t.error("Tag could be omitted only for .use()") : null === i.use && (o = this._encodeComposite(e, a, n, s)) | |
} | |
return null !== i.explicit && (o = this._encodeComposite(i.explicit, !1, "context", o)), | |
o | |
} | |
, | |
l.prototype._encodeChoice = function(e, t) { | |
const n = this._baseState | |
, r = n.choice[e.type]; | |
return r || s(!1, e.type + " not found in " + JSON.stringify(Object.keys(n.choice))), | |
r._encode(e.value, t) | |
} | |
, | |
l.prototype._encodePrimitive = function(e, t) { | |
const n = this._baseState; | |
if (/str$/.test(e)) | |
return this._encodeStr(t, e); | |
if ("objid" === e && n.args) | |
return this._encodeObjid(t, n.reverseArgs[0], n.args[1]); | |
if ("objid" === e) | |
return this._encodeObjid(t, null, null); | |
if ("gentime" === e || "utctime" === e) | |
return this._encodeTime(t, e); | |
if ("null_" === e) | |
return this._encodeNull(); | |
if ("int" === e || "enum" === e) | |
return this._encodeInt(t, n.args && n.reverseArgs[0]); | |
if ("bool" === e) | |
return this._encodeBool(t); | |
if ("objDesc" === e) | |
return this._encodeStr(t, e); | |
throw new Error("Unsupported tag: " + e) | |
} | |
, | |
l.prototype._isNumstr = function(e) { | |
return /^[0-9 ]*$/.test(e) | |
} | |
, | |
l.prototype._isPrintstr = function(e) { | |
return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(e) | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1/base/reporter.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/inherits/inherits_browser.js"); | |
function i(e) { | |
this._reporterState = { | |
obj: null, | |
path: [], | |
options: e || {}, | |
errors: [] | |
} | |
} | |
function o(e, t) { | |
this.path = e, | |
this.rethrow(t) | |
} | |
t.Reporter = i, | |
i.prototype.isError = function(e) { | |
return e instanceof o | |
} | |
, | |
i.prototype.save = function() { | |
const e = this._reporterState; | |
return { | |
obj: e.obj, | |
pathLen: e.path.length | |
} | |
} | |
, | |
i.prototype.restore = function(e) { | |
const t = this._reporterState; | |
t.obj = e.obj, | |
t.path = t.path.slice(0, e.pathLen) | |
} | |
, | |
i.prototype.enterKey = function(e) { | |
return this._reporterState.path.push(e) | |
} | |
, | |
i.prototype.exitKey = function(e) { | |
const t = this._reporterState; | |
t.path = t.path.slice(0, e - 1) | |
} | |
, | |
i.prototype.leaveKey = function(e, t, n) { | |
const r = this._reporterState; | |
this.exitKey(e), | |
null !== r.obj && (r.obj[t] = n) | |
} | |
, | |
i.prototype.path = function() { | |
return this._reporterState.path.join("/") | |
} | |
, | |
i.prototype.enterObject = function() { | |
const e = this._reporterState | |
, t = e.obj; | |
return e.obj = {}, | |
t | |
} | |
, | |
i.prototype.leaveObject = function(e) { | |
const t = this._reporterState | |
, n = t.obj; | |
return t.obj = e, | |
n | |
} | |
, | |
i.prototype.error = function(e) { | |
let t; | |
const n = this._reporterState | |
, r = e instanceof o; | |
if (t = r ? e : new o(n.path.map((function(e) { | |
return "[" + JSON.stringify(e) + "]" | |
} | |
)).join(""),e.message || e,e.stack), | |
!n.options.partial) | |
throw t; | |
return r || n.errors.push(t), | |
t | |
} | |
, | |
i.prototype.wrapResult = function(e) { | |
const t = this._reporterState; | |
return t.options.partial ? { | |
result: this.isError(e) ? null : e, | |
errors: t.errors | |
} : e | |
} | |
, | |
r(o, Error), | |
o.prototype.rethrow = function(e) { | |
if (this.message = e + " at: " + (this.path || "(shallow)"), | |
Error.captureStackTrace && Error.captureStackTrace(this, o), | |
!this.stack) | |
try { | |
throw new Error(this.message) | |
} catch (e) { | |
this.stack = e.stack | |
} | |
return this | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1/constants/der.js": function(e, t, n) { | |
"use strict"; | |
function r(e) { | |
const t = {}; | |
return Object.keys(e).forEach((function(n) { | |
(0 | n) == n && (n |= 0); | |
const r = e[n]; | |
t[r] = n | |
} | |
)), | |
t | |
} | |
t.tagClass = { | |
0: "universal", | |
1: "application", | |
2: "context", | |
3: "private" | |
}, | |
t.tagClassByName = r(t.tagClass), | |
t.tag = { | |
0: "end", | |
1: "bool", | |
2: "int", | |
3: "bitstr", | |
4: "octstr", | |
5: "null_", | |
6: "objid", | |
7: "objDesc", | |
8: "external", | |
9: "real", | |
10: "enum", | |
11: "embed", | |
12: "utf8str", | |
13: "relativeOid", | |
16: "seq", | |
17: "set", | |
18: "numstr", | |
19: "printstr", | |
20: "t61str", | |
21: "videostr", | |
22: "ia5str", | |
23: "utctime", | |
24: "gentime", | |
25: "graphstr", | |
26: "iso646str", | |
27: "genstr", | |
28: "unistr", | |
29: "charstr", | |
30: "bmpstr" | |
}, | |
t.tagByName = r(t.tag) | |
}, | |
"./node_modules/asn1.js/lib/asn1/constants/index.js": function(e, t, n) { | |
"use strict"; | |
const r = t; | |
r._reverse = function(e) { | |
const t = {}; | |
return Object.keys(e).forEach((function(n) { | |
(0 | n) == n && (n |= 0); | |
const r = e[n]; | |
t[r] = n | |
} | |
)), | |
t | |
} | |
, | |
r.der = n("./node_modules/asn1.js/lib/asn1/constants/der.js") | |
}, | |
"./node_modules/asn1.js/lib/asn1/decoders/der.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/inherits/inherits_browser.js") | |
, i = n("./node_modules/bn.js/lib/bn.js") | |
, o = n("./node_modules/asn1.js/lib/asn1/base/buffer.js").DecoderBuffer | |
, s = n("./node_modules/asn1.js/lib/asn1/base/node.js") | |
, a = n("./node_modules/asn1.js/lib/asn1/constants/der.js"); | |
function u(e) { | |
this.enc = "der", | |
this.name = e.name, | |
this.entity = e, | |
this.tree = new l, | |
this.tree._init(e.body) | |
} | |
function l(e) { | |
s.call(this, "der", e) | |
} | |
function c(e, t) { | |
let n = e.readUInt8(t); | |
if (e.isError(n)) | |
return n; | |
const r = a.tagClass[n >> 6] | |
, i = 0 == (32 & n); | |
if (31 == (31 & n)) { | |
let r = n; | |
for (n = 0; 128 == (128 & r); ) { | |
if (r = e.readUInt8(t), | |
e.isError(r)) | |
return r; | |
n <<= 7, | |
n |= 127 & r | |
} | |
} else | |
n &= 31; | |
return { | |
cls: r, | |
primitive: i, | |
tag: n, | |
tagStr: a.tag[n] | |
} | |
} | |
function d(e, t, n) { | |
let r = e.readUInt8(n); | |
if (e.isError(r)) | |
return r; | |
if (!t && 128 === r) | |
return null; | |
if (0 == (128 & r)) | |
return r; | |
const i = 127 & r; | |
if (i > 4) | |
return e.error("length octect is too long"); | |
r = 0; | |
for (let t = 0; t < i; t++) { | |
r <<= 8; | |
const t = e.readUInt8(n); | |
if (e.isError(t)) | |
return t; | |
r |= t | |
} | |
return r | |
} | |
e.exports = u, | |
u.prototype.decode = function(e, t) { | |
return o.isDecoderBuffer(e) || (e = new o(e,t)), | |
this.tree._decode(e, t) | |
} | |
, | |
r(l, s), | |
l.prototype._peekTag = function(e, t, n) { | |
if (e.isEmpty()) | |
return !1; | |
const r = e.save() | |
, i = c(e, 'Failed to peek tag: "' + t + '"'); | |
return e.isError(i) ? i : (e.restore(r), | |
i.tag === t || i.tagStr === t || i.tagStr + "of" === t || n) | |
} | |
, | |
l.prototype._decodeTag = function(e, t, n) { | |
const r = c(e, 'Failed to decode tag of "' + t + '"'); | |
if (e.isError(r)) | |
return r; | |
let i = d(e, r.primitive, 'Failed to get length of "' + t + '"'); | |
if (e.isError(i)) | |
return i; | |
if (!n && r.tag !== t && r.tagStr !== t && r.tagStr + "of" !== t) | |
return e.error('Failed to match tag: "' + t + '"'); | |
if (r.primitive || null !== i) | |
return e.skip(i, 'Failed to match body of: "' + t + '"'); | |
const o = e.save() | |
, s = this._skipUntilEnd(e, 'Failed to skip indefinite length body: "' + this.tag + '"'); | |
return e.isError(s) ? s : (i = e.offset - o.offset, | |
e.restore(o), | |
e.skip(i, 'Failed to match body of: "' + t + '"')) | |
} | |
, | |
l.prototype._skipUntilEnd = function(e, t) { | |
for (; ; ) { | |
const n = c(e, t); | |
if (e.isError(n)) | |
return n; | |
const r = d(e, n.primitive, t); | |
if (e.isError(r)) | |
return r; | |
let i; | |
if (i = n.primitive || null !== r ? e.skip(r) : this._skipUntilEnd(e, t), | |
e.isError(i)) | |
return i; | |
if ("end" === n.tagStr) | |
break | |
} | |
} | |
, | |
l.prototype._decodeList = function(e, t, n, r) { | |
const i = []; | |
for (; !e.isEmpty(); ) { | |
const t = this._peekTag(e, "end"); | |
if (e.isError(t)) | |
return t; | |
const o = n.decode(e, "der", r); | |
if (e.isError(o) && t) | |
break; | |
i.push(o) | |
} | |
return i | |
} | |
, | |
l.prototype._decodeStr = function(e, t) { | |
if ("bitstr" === t) { | |
const t = e.readUInt8(); | |
return e.isError(t) ? t : { | |
unused: t, | |
data: e.raw() | |
} | |
} | |
if ("bmpstr" === t) { | |
const t = e.raw(); | |
if (t.length % 2 == 1) | |
return e.error("Decoding of string type: bmpstr length mismatch"); | |
let n = ""; | |
for (let e = 0; e < t.length / 2; e++) | |
n += String.fromCharCode(t.readUInt16BE(2 * e)); | |
return n | |
} | |
if ("numstr" === t) { | |
const t = e.raw().toString("ascii"); | |
return this._isNumstr(t) ? t : e.error("Decoding of string type: numstr unsupported characters") | |
} | |
if ("octstr" === t) | |
return e.raw(); | |
if ("objDesc" === t) | |
return e.raw(); | |
if ("printstr" === t) { | |
const t = e.raw().toString("ascii"); | |
return this._isPrintstr(t) ? t : e.error("Decoding of string type: printstr unsupported characters") | |
} | |
return /str$/.test(t) ? e.raw().toString() : e.error("Decoding of string type: " + t + " unsupported") | |
} | |
, | |
l.prototype._decodeObjid = function(e, t, n) { | |
let r; | |
const i = []; | |
let o = 0 | |
, s = 0; | |
for (; !e.isEmpty(); ) | |
s = e.readUInt8(), | |
o <<= 7, | |
o |= 127 & s, | |
0 == (128 & s) && (i.push(o), | |
o = 0); | |
128 & s && i.push(o); | |
const a = i[0] / 40 | 0 | |
, u = i[0] % 40; | |
if (r = n ? i : [a, u].concat(i.slice(1)), | |
t) { | |
let e = t[r.join(" ")]; | |
void 0 === e && (e = t[r.join(".")]), | |
void 0 !== e && (r = e) | |
} | |
return r | |
} | |
, | |
l.prototype._decodeTime = function(e, t) { | |
const n = e.raw().toString(); | |
let r, i, o, s, a, u; | |
if ("gentime" === t) | |
r = 0 | n.slice(0, 4), | |
i = 0 | n.slice(4, 6), | |
o = 0 | n.slice(6, 8), | |
s = 0 | n.slice(8, 10), | |
a = 0 | n.slice(10, 12), | |
u = 0 | n.slice(12, 14); | |
else { | |
if ("utctime" !== t) | |
return e.error("Decoding " + t + " time is not supported yet"); | |
r = 0 | n.slice(0, 2), | |
i = 0 | n.slice(2, 4), | |
o = 0 | n.slice(4, 6), | |
s = 0 | n.slice(6, 8), | |
a = 0 | n.slice(8, 10), | |
u = 0 | n.slice(10, 12), | |
r = r < 70 ? 2e3 + r : 1900 + r | |
} | |
return Date.UTC(r, i - 1, o, s, a, u, 0) | |
} | |
, | |
l.prototype._decodeNull = function() { | |
return null | |
} | |
, | |
l.prototype._decodeBool = function(e) { | |
const t = e.readUInt8(); | |
return e.isError(t) ? t : 0 !== t | |
} | |
, | |
l.prototype._decodeInt = function(e, t) { | |
const n = e.raw(); | |
let r = new i(n); | |
return t && (r = t[r.toString(10)] || r), | |
r | |
} | |
, | |
l.prototype._use = function(e, t) { | |
return "function" == typeof e && (e = e(t)), | |
e._getDecoder("der").tree | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1/decoders/index.js": function(e, t, n) { | |
"use strict"; | |
const r = t; | |
r.der = n("./node_modules/asn1.js/lib/asn1/decoders/der.js"), | |
r.pem = n("./node_modules/asn1.js/lib/asn1/decoders/pem.js") | |
}, | |
"./node_modules/asn1.js/lib/asn1/decoders/pem.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/inherits/inherits_browser.js") | |
, i = n("./node_modules/safer-buffer/safer.js").Buffer | |
, o = n("./node_modules/asn1.js/lib/asn1/decoders/der.js"); | |
function s(e) { | |
o.call(this, e), | |
this.enc = "pem" | |
} | |
r(s, o), | |
e.exports = s, | |
s.prototype.decode = function(e, t) { | |
const n = e.toString().split(/[\r\n]+/g) | |
, r = t.label.toUpperCase() | |
, s = /^-----(BEGIN|END) ([^-]+)-----$/; | |
let a = -1 | |
, u = -1; | |
for (let e = 0; e < n.length; e++) { | |
const t = n[e].match(s); | |
if (null !== t && t[2] === r) { | |
if (-1 !== a) { | |
if ("END" !== t[1]) | |
break; | |
u = e; | |
break | |
} | |
if ("BEGIN" !== t[1]) | |
break; | |
a = e | |
} | |
} | |
if (-1 === a || -1 === u) | |
throw new Error("PEM section not found for: " + r); | |
const l = n.slice(a + 1, u).join(""); | |
l.replace(/[^a-z0-9+/=]+/gi, ""); | |
const c = i.from(l, "base64"); | |
return o.prototype.decode.call(this, c, t) | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1/encoders/der.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/inherits/inherits_browser.js") | |
, i = n("./node_modules/safer-buffer/safer.js").Buffer | |
, o = n("./node_modules/asn1.js/lib/asn1/base/node.js") | |
, s = n("./node_modules/asn1.js/lib/asn1/constants/der.js"); | |
function a(e) { | |
this.enc = "der", | |
this.name = e.name, | |
this.entity = e, | |
this.tree = new u, | |
this.tree._init(e.body) | |
} | |
function u(e) { | |
o.call(this, "der", e) | |
} | |
function l(e) { | |
return e < 10 ? "0" + e : e | |
} | |
e.exports = a, | |
a.prototype.encode = function(e, t) { | |
return this.tree._encode(e, t).join() | |
} | |
, | |
r(u, o), | |
u.prototype._encodeComposite = function(e, t, n, r) { | |
const o = function(e, t, n, r) { | |
let i; | |
"seqof" === e ? e = "seq" : "setof" === e && (e = "set"); | |
if (s.tagByName.hasOwnProperty(e)) | |
i = s.tagByName[e]; | |
else { | |
if ("number" != typeof e || (0 | e) !== e) | |
return r.error("Unknown tag: " + e); | |
i = e | |
} | |
if (i >= 31) | |
return r.error("Multi-octet tag encoding unsupported"); | |
t || (i |= 32); | |
return i |= s.tagClassByName[n || "universal"] << 6, | |
i | |
}(e, t, n, this.reporter); | |
if (r.length < 128) { | |
const e = i.alloc(2); | |
return e[0] = o, | |
e[1] = r.length, | |
this._createEncoderBuffer([e, r]) | |
} | |
let a = 1; | |
for (let e = r.length; e >= 256; e >>= 8) | |
a++; | |
const u = i.alloc(2 + a); | |
u[0] = o, | |
u[1] = 128 | a; | |
for (let e = 1 + a, t = r.length; t > 0; e--, | |
t >>= 8) | |
u[e] = 255 & t; | |
return this._createEncoderBuffer([u, r]) | |
} | |
, | |
u.prototype._encodeStr = function(e, t) { | |
if ("bitstr" === t) | |
return this._createEncoderBuffer([0 | e.unused, e.data]); | |
if ("bmpstr" === t) { | |
const t = i.alloc(2 * e.length); | |
for (let n = 0; n < e.length; n++) | |
t.writeUInt16BE(e.charCodeAt(n), 2 * n); | |
return this._createEncoderBuffer(t) | |
} | |
return "numstr" === t ? this._isNumstr(e) ? this._createEncoderBuffer(e) : this.reporter.error("Encoding of string type: numstr supports only digits and space") : "printstr" === t ? this._isPrintstr(e) ? this._createEncoderBuffer(e) : this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark") : /str$/.test(t) || "objDesc" === t ? this._createEncoderBuffer(e) : this.reporter.error("Encoding of string type: " + t + " unsupported") | |
} | |
, | |
u.prototype._encodeObjid = function(e, t, n) { | |
if ("string" == typeof e) { | |
if (!t) | |
return this.reporter.error("string objid given, but no values map found"); | |
if (!t.hasOwnProperty(e)) | |
return this.reporter.error("objid not found in values map"); | |
e = t[e].split(/[\s.]+/g); | |
for (let t = 0; t < e.length; t++) | |
e[t] |= 0 | |
} else if (Array.isArray(e)) { | |
e = e.slice(); | |
for (let t = 0; t < e.length; t++) | |
e[t] |= 0 | |
} | |
if (!Array.isArray(e)) | |
return this.reporter.error("objid() should be either array or string, got: " + JSON.stringify(e)); | |
if (!n) { | |
if (e[1] >= 40) | |
return this.reporter.error("Second objid identifier OOB"); | |
e.splice(0, 2, 40 * e[0] + e[1]) | |
} | |
let r = 0; | |
for (let t = 0; t < e.length; t++) { | |
let n = e[t]; | |
for (r++; n >= 128; n >>= 7) | |
r++ | |
} | |
const o = i.alloc(r); | |
let s = o.length - 1; | |
for (let t = e.length - 1; t >= 0; t--) { | |
let n = e[t]; | |
for (o[s--] = 127 & n; (n >>= 7) > 0; ) | |
o[s--] = 128 | 127 & n | |
} | |
return this._createEncoderBuffer(o) | |
} | |
, | |
u.prototype._encodeTime = function(e, t) { | |
let n; | |
const r = new Date(e); | |
return "gentime" === t ? n = [l(r.getUTCFullYear()), l(r.getUTCMonth() + 1), l(r.getUTCDate()), l(r.getUTCHours()), l(r.getUTCMinutes()), l(r.getUTCSeconds()), "Z"].join("") : "utctime" === t ? n = [l(r.getUTCFullYear() % 100), l(r.getUTCMonth() + 1), l(r.getUTCDate()), l(r.getUTCHours()), l(r.getUTCMinutes()), l(r.getUTCSeconds()), "Z"].join("") : this.reporter.error("Encoding " + t + " time is not supported yet"), | |
this._encodeStr(n, "octstr") | |
} | |
, | |
u.prototype._encodeNull = function() { | |
return this._createEncoderBuffer("") | |
} | |
, | |
u.prototype._encodeInt = function(e, t) { | |
if ("string" == typeof e) { | |
if (!t) | |
return this.reporter.error("String int or enum given, but no values map"); | |
if (!t.hasOwnProperty(e)) | |
return this.reporter.error("Values map doesn't contain: " + JSON.stringify(e)); | |
e = t[e] | |
} | |
if ("number" != typeof e && !i.isBuffer(e)) { | |
const t = e.toArray(); | |
!e.sign && 128 & t[0] && t.unshift(0), | |
e = i.from(t) | |
} | |
if (i.isBuffer(e)) { | |
let t = e.length; | |
0 === e.length && t++; | |
const n = i.alloc(t); | |
return e.copy(n), | |
0 === e.length && (n[0] = 0), | |
this._createEncoderBuffer(n) | |
} | |
if (e < 128) | |
return this._createEncoderBuffer(e); | |
if (e < 256) | |
return this._createEncoderBuffer([0, e]); | |
let n = 1; | |
for (let t = e; t >= 256; t >>= 8) | |
n++; | |
const r = new Array(n); | |
for (let t = r.length - 1; t >= 0; t--) | |
r[t] = 255 & e, | |
e >>= 8; | |
return 128 & r[0] && r.unshift(0), | |
this._createEncoderBuffer(i.from(r)) | |
} | |
, | |
u.prototype._encodeBool = function(e) { | |
return this._createEncoderBuffer(e ? 255 : 0) | |
} | |
, | |
u.prototype._use = function(e, t) { | |
return "function" == typeof e && (e = e(t)), | |
e._getEncoder("der").tree | |
} | |
, | |
u.prototype._skipDefault = function(e, t, n) { | |
const r = this._baseState; | |
let i; | |
if (null === r.default) | |
return !1; | |
const o = e.join(); | |
if (void 0 === r.defaultBuffer && (r.defaultBuffer = this._encodeValue(r.default, t, n).join()), | |
o.length !== r.defaultBuffer.length) | |
return !1; | |
for (i = 0; i < o.length; i++) | |
if (o[i] !== r.defaultBuffer[i]) | |
return !1; | |
return !0 | |
} | |
}, | |
"./node_modules/asn1.js/lib/asn1/encoders/index.js": function(e, t, n) { | |
"use strict"; | |
const r = t; | |
r.der = n("./node_modules/asn1.js/lib/asn1/encoders/der.js"), | |
r.pem = n("./node_modules/asn1.js/lib/asn1/encoders/pem.js") | |
}, | |
"./node_modules/asn1.js/lib/asn1/encoders/pem.js": function(e, t, n) { | |
"use strict"; | |
const r = n("./node_modules/inherits/inherits_browser.js") | |
, i = n("./node_modules/asn1.js/lib/asn1/encoders/der.js"); | |
function o(e) { | |
i.call(this, e), | |
this.enc = "pem" | |
} | |
r(o, i), | |
e.exports = o, | |
o.prototype.encode = function(e, t) { | |
const n = i.prototype.encode.call(this, e).toString("base64") | |
, r = ["-----BEGIN " + t.label + "-----"]; | |
for (let e = 0; e < n.length; e += 64) | |
r.push(n.slice(e, e + 64)); | |
return r.push("-----END " + t.label + "-----"), | |
r.join("\n") | |
} | |
}, | |
"./node_modules/base64-js/index.js": function(e, t, n) { | |
"use strict"; | |
t.byteLength = function(e) { | |
var t = l(e) | |
, n = t[0] | |
, r = t[1]; | |
return 3 * (n + r) / 4 - r | |
} | |
, | |
t.toByteArray = function(e) { | |
var t, n, r = l(e), s = r[0], a = r[1], u = new o(function(e, t, n) { | |
return 3 * (t + n) / 4 - n | |
}(0, s, a)), c = 0, d = a > 0 ? s - 4 : s; | |
for (n = 0; n < d; n += 4) | |
t = i[e.charCodeAt(n)] << 18 | i[e.charCodeAt(n + 1)] << 12 | i[e.charCodeAt(n + 2)] << 6 | i[e.charCodeAt(n + 3)], | |
u[c++] = t >> 16 & 255, | |
u[c++] = t >> 8 & 255, | |
u[c++] = 255 & t; | |
2 === a && (t = i[e.charCodeAt(n)] << 2 | i[e.charCodeAt(n + 1)] >> 4, | |
u[c++] = 255 & t); | |
1 === a && (t = i[e.charCodeAt(n)] << 10 | i[e.charCodeAt(n + 1)] << 4 | i[e.charCodeAt(n + 2)] >> 2, | |
u[c++] = t >> 8 & 255, | |
u[c++] = 255 & t); | |
return u | |
} | |
, | |
t.fromByteArray = function(e) { | |
for (var t, n = e.length, i = n % 3, o = [], s = 0, a = n - i; s < a; s += 16383) | |
o.push(c(e, s, s + 16383 > a ? a : s + 16383)); | |
1 === i ? (t = e[n - 1], | |
o.push(r[t >> 2] + r[t << 4 & 63] + "==")) : 2 === i && (t = (e[n - 2] << 8) + e[n - 1], | |
o.push(r[t >> 10] + r[t >> 4 & 63] + r[t << 2 & 63] + "=")); | |
return o.join("") | |
} | |
; | |
for (var r = [], i = [], o = "undefined" != typeof Uint8Array ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, u = s.length; a < u; ++a) | |
r[a] = s[a], | |
i[s.charCodeAt(a)] = a; | |
function l(e) { | |
var t = e.length; | |
if (t % 4 > 0) | |
throw new Error("Invalid string. Length must be a multiple of 4"); | |
var n = e.indexOf("="); | |
return -1 === n && (n = t), | |
[n, n === t ? 0 : 4 - n % 4] | |
} | |
function c(e, t, n) { | |
for (var i, o, s = [], a = t; a < n; a += 3) | |
i = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (255 & e[a + 2]), | |
s.push(r[(o = i) >> 18 & 63] + r[o >> 12 & 63] + r[o >> 6 & 63] + r[63 & o]); | |
return s.join("") | |
} | |
i["-".charCodeAt(0)] = 62, | |
i["_".charCodeAt(0)] = 63 | |
}, | |
"./node_modules/bn.js/lib/bn.js": function(e, t, n) { | |
(function(e) { | |
!function(e, t) { | |
"use strict"; | |
function r(e, t) { | |
if (!e) | |
throw new Error(t || "Assertion failed") | |
} | |
function i(e, t) { | |
e.super_ = t; | |
var n = function() {}; | |
n.prototype = t.prototype, | |
e.prototype = new n, | |
e.prototype.constructor = e | |
} | |
function o(e, t, n) { | |
if (o.isBN(e)) | |
return e; | |
this.negative = 0, | |
this.words = null, | |
this.length = 0, | |
this.red = null, | |
null !== e && ("le" !== t && "be" !== t || (n = t, | |
t = 10), | |
this._init(e || 0, t || 10, n || "be")) | |
} | |
var s; | |
"object" == typeof e ? e.exports = o : t.BN = o, | |
o.BN = o, | |
o.wordSize = 26; | |
try { | |
s = n(5).Buffer | |
} catch (e) {} | |
function a(e, t, n) { | |
for (var r = 0, i = Math.min(e.length, n), o = t; o < i; o++) { | |
var s = e.charCodeAt(o) - 48; | |
r <<= 4, | |
r |= s >= 49 && s <= 54 ? s - 49 + 10 : s >= 17 && s <= 22 ? s - 17 + 10 : 15 & s | |
} | |
return r | |
} | |
function u(e, t, n, r) { | |
for (var i = 0, o = Math.min(e.length, n), s = t; s < o; s++) { | |
var a = e.charCodeAt(s) - 48; | |
i *= r, | |
i += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a | |
} | |
return i | |
} | |
o.isBN = function(e) { | |
return e instanceof o || null !== e && "object" == typeof e && e.constructor.wordSize === o.wordSize && Array.isArray(e.words) | |
} | |
, | |
o.max = function(e, t) { | |
return e.cmp(t) > 0 ? e : t | |
} | |
, | |
o.min = function(e, t) { | |
return e.cmp(t) < 0 ? e : t | |
} | |
, | |
o.prototype._init = function(e, t, n) { | |
if ("number" == typeof e) | |
return this._initNumber(e, t, n); | |
if ("object" == typeof e) | |
return this._initArray(e, t, n); | |
"hex" === t && (t = 16), | |
r(t === (0 | t) && t >= 2 && t <= 36); | |
var i = 0; | |
"-" === (e = e.toString().replace(/\s+/g, ""))[0] && i++, | |
16 === t ? this._parseHex(e, i) : this._parseBase(e, t, i), | |
"-" === e[0] && (this.negative = 1), | |
this.strip(), | |
"le" === n && this._initArray(this.toArray(), t, n) | |
} | |
, | |
o.prototype._initNumber = function(e, t, n) { | |
e < 0 && (this.negative = 1, | |
e = -e), | |
e < 67108864 ? (this.words = [67108863 & e], | |
this.length = 1) : e < 4503599627370496 ? (this.words = [67108863 & e, e / 67108864 & 67108863], | |
this.length = 2) : (r(e < 9007199254740992), | |
this.words = [67108863 & e, e / 67108864 & 67108863, 1], | |
this.length = 3), | |
"le" === n && this._initArray(this.toArray(), t, n) | |
} | |
, | |
o.prototype._initArray = function(e, t, n) { | |
if (r("number" == typeof e.length), | |
e.length <= 0) | |
return this.words = [0], | |
this.length = 1, | |
this; | |
this.length = Math.ceil(e.length / 3), | |
this.words = new Array(this.length); | |
for (var i = 0; i < this.length; i++) | |
this.words[i] = 0; | |
var o, s, a = 0; | |
if ("be" === n) | |
for (i = e.length - 1, | |
o = 0; i >= 0; i -= 3) | |
s = e[i] | e[i - 1] << 8 | e[i - 2] << 16, | |
this.words[o] |= s << a & 67108863, | |
this.words[o + 1] = s >>> 26 - a & 67108863, | |
(a += 24) >= 26 && (a -= 26, | |
o++); | |
else if ("le" === n) | |
for (i = 0, | |
o = 0; i < e.length; i += 3) | |
s = e[i] | e[i + 1] << 8 | e[i + 2] << 16, | |
this.words[o] |= s << a & 67108863, | |
this.words[o + 1] = s >>> 26 - a & 67108863, | |
(a += 24) >= 26 && (a -= 26, | |
o++); | |
return this.strip() | |
} | |
, | |
o.prototype._parseHex = function(e, t) { | |
this.length = Math.ceil((e.length - t) / 6), | |
this.words = new Array(this.length); | |
for (var n = 0; n < this.length; n++) | |
this.words[n] = 0; | |
var r, i, o = 0; | |
for (n = e.length - 6, | |
r = 0; n >= t; n -= 6) | |
i = a(e, n, n + 6), | |
this.words[r] |= i << o & 67108863, | |
this.words[r + 1] |= i >>> 26 - o & 4194303, | |
(o += 24) >= 26 && (o -= 26, | |
r++); | |
n + 6 !== t && (i = a(e, t, n + 6), | |
this.words[r] |= i << o & 67108863, | |
this.words[r + 1] |= i >>> 26 - o & 4194303), | |
this.strip() | |
} | |
, | |
o.prototype._parseBase = function(e, t, n) { | |
this.words = [0], | |
this.length = 1; | |
for (var r = 0, i = 1; i <= 67108863; i *= t) | |
r++; | |
r--, | |
i = i / t | 0; | |
for (var o = e.length - n, s = o % r, a = Math.min(o, o - s) + n, l = 0, c = n; c < a; c += r) | |
l = u(e, c, c + r, t), | |
this.imuln(i), | |
this.words[0] + l < 67108864 ? this.words[0] += l : this._iaddn(l); | |
if (0 !== s) { | |
var d = 1; | |
for (l = u(e, c, e.length, t), | |
c = 0; c < s; c++) | |
d *= t; | |
this.imuln(d), | |
this.words[0] + l < 67108864 ? this.words[0] += l : this._iaddn(l) | |
} | |
} | |
, | |
o.prototype.copy = function(e) { | |
e.words = new Array(this.length); | |
for (var t = 0; t < this.length; t++) | |
e.words[t] = this.words[t]; | |
e.length = this.length, | |
e.negative = this.negative, | |
e.red = this.red | |
} | |
, | |
o.prototype.clone = function() { | |
var e = new o(null); | |
return this.copy(e), | |
e | |
} | |
, | |
o.prototype._expand = function(e) { | |
for (; this.length < e; ) | |
this.words[this.length++] = 0; | |
return this | |
} | |
, | |
o.prototype.strip = function() { | |
for (; this.length > 1 && 0 === this.words[this.length - 1]; ) | |
this.length--; | |
return this._normSign() | |
} | |
, | |
o.prototype._normSign = function() { | |
return 1 === this.length && 0 === this.words[0] && (this.negative = 0), | |
this | |
} | |
, | |
o.prototype.inspect = function() { | |
return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">" | |
} | |
; | |
var l = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"] | |
, c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] | |
, d = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176]; | |
function f(e, t, n) { | |
n.negative = t.negative ^ e.negative; | |
var r = e.length + t.length | 0; | |
n.length = r, | |
r = r - 1 | 0; | |
var i = 0 | e.words[0] | |
, o = 0 | t.words[0] | |
, s = i * o | |
, a = 67108863 & s | |
, u = s / 67108864 | 0; | |
n.words[0] = a; | |
for (var l = 1; l < r; l++) { | |
for (var c = u >>> 26, d = 67108863 & u, f = Math.min(l, t.length - 1), h = Math.max(0, l - e.length + 1); h <= f; h++) { | |
var p = l - h | 0; | |
c += (s = (i = 0 | e.words[p]) * (o = 0 | t.words[h]) + d) / 67108864 | 0, | |
d = 67108863 & s | |
} | |
n.words[l] = 0 | d, | |
u = 0 | c | |
} | |
return 0 !== u ? n.words[l] = 0 | u : n.length--, | |
n.strip() | |
} | |
o.prototype.toString = function(e, t) { | |
var n; | |
if (t = 0 | t || 1, | |
16 === (e = e || 10) || "hex" === e) { | |
n = ""; | |
for (var i = 0, o = 0, s = 0; s < this.length; s++) { | |
var a = this.words[s] | |
, u = (16777215 & (a << i | o)).toString(16); | |
n = 0 !== (o = a >>> 24 - i & 16777215) || s !== this.length - 1 ? l[6 - u.length] + u + n : u + n, | |
(i += 2) >= 26 && (i -= 26, | |
s--) | |
} | |
for (0 !== o && (n = o.toString(16) + n); n.length % t != 0; ) | |
n = "0" + n; | |
return 0 !== this.negative && (n = "-" + n), | |
n | |
} | |
if (e === (0 | e) && e >= 2 && e <= 36) { | |
var f = c[e] | |
, h = d[e]; | |
n = ""; | |
var p = this.clone(); | |
for (p.negative = 0; !p.isZero(); ) { | |
var m = p.modn(h).toString(e); | |
n = (p = p.idivn(h)).isZero() ? m + n : l[f - m.length] + m + n | |
} | |
for (this.isZero() && (n = "0" + n); n.length % t != 0; ) | |
n = "0" + n; | |
return 0 !== this.negative && (n = "-" + n), | |
n | |
} | |
r(!1, "Base should be between 2 and 36") | |
} | |
, | |
o.prototype.toNumber = function() { | |
var e = this.words[0]; | |
return 2 === this.length ? e += 67108864 * this.words[1] : 3 === this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 * this.words[1] : this.length > 2 && r(!1, "Number can only safely store up to 53 bits"), | |
0 !== this.negative ? -e : e | |
} | |
, | |
o.prototype.toJSON = function() { | |
return this.toString(16) | |
} | |
, | |
o.prototype.toBuffer = function(e, t) { | |
return r(void 0 !== s), | |
this.toArrayLike(s, e, t) | |
} | |
, | |
o.prototype.toArray = function(e, t) { | |
return this.toArrayLike(Array, e, t) | |
} | |
, | |
o.prototype.toArrayLike = function(e, t, n) { | |
var i = this.byteLength() | |
, o = n || Math.max(1, i); | |
r(i <= o, "byte array longer than desired length"), | |
r(o > 0, "Requested array length <= 0"), | |
this.strip(); | |
var s, a, u = "le" === t, l = new e(o), c = this.clone(); | |
if (u) { | |
for (a = 0; !c.isZero(); a++) | |
s = c.andln(255), | |
c.iushrn(8), | |
l[a] = s; | |
for (; a < o; a++) | |
l[a] = 0 | |
} else { | |
for (a = 0; a < o - i; a++) | |
l[a] = 0; | |
for (a = 0; !c.isZero(); a++) | |
s = c.andln(255), | |
c.iushrn(8), | |
l[o - a - 1] = s | |
} | |
return l | |
} | |
, | |
Math.clz32 ? o.prototype._countBits = function(e) { | |
return 32 - Math.clz32(e) | |
} | |
: o.prototype._countBits = function(e) { | |
var t = e | |
, n = 0; | |
return t >= 4096 && (n += 13, | |
t >>>= 13), | |
t >= 64 && (n += 7, | |
t >>>= 7), | |
t >= 8 && (n += 4, | |
t >>>= 4), | |
t >= 2 && (n += 2, | |
t >>>= 2), | |
n + t | |
} | |
, | |
o.prototype._zeroBits = function(e) { | |
if (0 === e) | |
return 26; | |
var t = e | |
, n = 0; | |
return 0 == (8191 & t) && (n += 13, | |
t >>>= 13), | |
0 == (127 & t) && (n += 7, | |
t >>>= 7), | |
0 == (15 & t) && (n += 4, | |
t >>>= 4), | |
0 == (3 & t) && (n += 2, | |
t >>>= 2), | |
0 == (1 & t) && n++, | |
n | |
} | |
, | |
o.prototype.bitLength = function() { | |
var e = this.words[this.length - 1] | |
, t = this._countBits(e); | |
return 26 * (this.length - 1) + t | |
} | |
, | |
o.prototype.zeroBits = function() { | |
if (this.isZero()) | |
return 0; | |
for (var e = 0, t = 0; t < this.length; t++) { | |
var n = this._zeroBits(this.words[t]); | |
if (e += n, | |
26 !== n) | |
break | |
} | |
return e | |
} | |
, | |
o.prototype.byteLength = function() { | |
return Math.ceil(this.bitLength() / 8) | |
} | |
, | |
o.prototype.toTwos = function(e) { | |
return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) : this.clone() | |
} | |
, | |
o.prototype.fromTwos = function(e) { | |
return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone() | |
} | |
, | |
o.prototype.isNeg = function() { | |
return 0 !== this.negative | |
} | |
, | |
o.prototype.neg = function() { | |
return this.clone().ineg() | |
} | |
, | |
o.prototype.ineg = function() { | |
return this.isZero() || (this.negative ^= 1), | |
this | |
} | |
, | |
o.prototype.iuor = function(e) { | |
for (; this.length < e.length; ) | |
this.words[this.length++] = 0; | |
for (var t = 0; t < e.length; t++) | |
this.words[t] = this.words[t] | e.words[t]; | |
return this.strip() | |
} | |
, | |
o.prototype.ior = function(e) { | |
return r(0 == (this.negative | e.negative)), | |
this.iuor(e) | |
} | |
, | |
o.prototype.or = function(e) { | |
return this.length > e.length ? this.clone().ior(e) : e.clone().ior(this) | |
} | |
, | |
o.prototype.uor = function(e) { | |
return this.length > e.length ? this.clone().iuor(e) : e.clone().iuor(this) | |
} | |
, | |
o.prototype.iuand = function(e) { | |
var t; | |
t = this.length > e.length ? e : this; | |
for (var n = 0; n < t.length; n++) | |
this.words[n] = this.words[n] & e.words[n]; | |
return this.length = t.length, | |
this.strip() | |
} | |
, | |
o.prototype.iand = function(e) { | |
return r(0 == (this.negative | e.negative)), | |
this.iuand(e) | |
} | |
, | |
o.prototype.and = function(e) { | |
return this.length > e.length ? this.clone().iand(e) : e.clone().iand(this) | |
} | |
, | |
o.prototype.uand = function(e) { | |
return this.length > e.length ? this.clone().iuand(e) : e.clone().iuand(this) | |
} | |
, | |
o.prototype.iuxor = function(e) { | |
var t, n; | |
this.length > e.length ? (t = this, | |
n = e) : (t = e, | |
n = this); | |
for (var r = 0; r < n.length; r++) | |
this.words[r] = t.words[r] ^ n.words[r]; | |
if (this !== t) | |
for (; r < t.length; r++) | |
this.words[r] = t.words[r]; | |
return this.length = t.length, | |
this.strip() | |
} | |
, | |
o.prototype.ixor = function(e) { | |
return r(0 == (this.negative | e.negative)), | |
this.iuxor(e) | |
} | |
, | |
o.prototype.xor = function(e) { | |
return this.length > e.length ? this.clone().ixor(e) : e.clone().ixor(this) | |
} | |
, | |
o.prototype.uxor = function(e) { | |
return this.length > e.length ? this.clone().iuxor(e) : e.clone().iuxor(this) | |
} | |
, | |
o.prototype.inotn = function(e) { | |
r("number" == typeof e && e >= 0); | |
var t = 0 | Math.ceil(e / 26) | |
, n = e % 26; | |
this._expand(t), | |
n > 0 && t--; | |
for (var i = 0; i < t; i++) | |
this.words[i] = 67108863 & ~this.words[i]; | |
return n > 0 && (this.words[i] = ~this.words[i] & 67108863 >> 26 - n), | |
this.strip() | |
} | |
, | |
o.prototype.notn = function(e) { | |
return this.clone().inotn(e) | |
} | |
, | |
o.prototype.setn = function(e, t) { | |
r("number" == typeof e && e >= 0); | |
var n = e / 26 | 0 | |
, i = e % 26; | |
return this._expand(n + 1), | |
this.words[n] = t ? this.words[n] | 1 << i : this.words[n] & ~(1 << i), | |
this.strip() | |
} | |
, | |
o.prototype.iadd = function(e) { | |
var t, n, r; | |
if (0 !== this.negative && 0 === e.negative) | |
return this.negative = 0, | |
t = this.isub(e), | |
this.negative ^= 1, | |
this._normSign(); | |
if (0 === this.negative && 0 !== e.negative) | |
return e.negative = 0, | |
t = this.isub(e), | |
e.negative = 1, | |
t._normSign(); | |
this.length > e.length ? (n = this, | |
r = e) : (n = e, | |
r = this); | |
for (var i = 0, o = 0; o < r.length; o++) | |
t = (0 | n.words[o]) + (0 | r.words[o]) + i, | |
this.words[o] = 67108863 & t, | |
i = t >>> 26; | |
for (; 0 !== i && o < n.length; o++) | |
t = (0 | n.words[o]) + i, | |
this.words[o] = 67108863 & t, | |
i = t >>> 26; | |
if (this.length = n.length, | |
0 !== i) | |
this.words[this.length] = i, | |
this.length++; | |
else if (n !== this) | |
for (; o < n.length; o++) | |
this.words[o] = n.words[o]; | |
return this | |
} | |
, | |
o.prototype.add = function(e) { | |
var t; | |
return 0 !== e.negative && 0 === this.negative ? (e.negative = 0, | |
t = this.sub(e), | |
e.negative ^= 1, | |
t) : 0 === e.negative && 0 !== this.negative ? (this.negative = 0, | |
t = e.sub(this), | |
this.negative = 1, | |
t) : this.length > e.length ? this.clone().iadd(e) : e.clone().iadd(this) | |
} | |
, | |
o.prototype.isub = function(e) { | |
if (0 !== e.negative) { | |
e.negative = 0; | |
var t = this.iadd(e); | |
return e.negative = 1, | |
t._normSign() | |
} | |
if (0 !== this.negative) | |
return this.negative = 0, | |
this.iadd(e), | |
this.negative = 1, | |
this._normSign(); | |
var n, r, i = this.cmp(e); | |
if (0 === i) | |
return this.negative = 0, | |
this.length = 1, | |
this.words[0] = 0, | |
this; | |
i > 0 ? (n = this, | |
r = e) : (n = e, | |
r = this); | |
for (var o = 0, s = 0; s < r.length; s++) | |
o = (t = (0 | n.words[s]) - (0 | r.words[s]) + o) >> 26, | |
this.words[s] = 67108863 & t; | |
for (; 0 !== o && s < n.length; s++) | |
o = (t = (0 | n.words[s]) + o) >> 26, | |
this.words[s] = 67108863 & t; | |
if (0 === o && s < n.length && n !== this) | |
for (; s < n.length; s++) | |
this.words[s] = n.words[s]; | |
return this.length = Math.max(this.length, s), | |
n !== this && (this.negative = 1), | |
this.strip() | |
} | |
, | |
o.prototype.sub = function(e) { | |
return this.clone().isub(e) | |
} | |
; | |
var h = function(e, t, n) { | |
var r, i, o, s = e.words, a = t.words, u = n.words, l = 0, c = 0 | s[0], d = 8191 & c, f = c >>> 13, h = 0 | s[1], p = 8191 & h, m = h >>> 13, b = 0 | s[2], g = 8191 & b, y = b >>> 13, v = 0 | s[3], _ = 8191 & v, w = v >>> 13, S = 0 | s[4], E = 8191 & S, j = S >>> 13, x = 0 | s[5], O = 8191 & x, M = x >>> 13, k = 0 | s[6], A = 8191 & k, C = k >>> 13, I = 0 | s[7], R = 8191 & I, T = I >>> 13, P = 0 | s[8], L = 8191 & P, N = P >>> 13, B = 0 | s[9], D = 8191 & B, U = B >>> 13, F = 0 | a[0], H = 8191 & F, z = F >>> 13, q = 0 | a[1], W = 8191 & q, K = q >>> 13, G = 0 | a[2], V = 8191 & G, Q = G >>> 13, Y = 0 | a[3], Z = 8191 & Y, $ = Y >>> 13, X = 0 | a[4], J = 8191 & X, ee = X >>> 13, te = 0 | a[5], ne = 8191 & te, re = te >>> 13, ie = 0 | a[6], oe = 8191 & ie, se = ie >>> 13, ae = 0 | a[7], ue = 8191 & ae, le = ae >>> 13, ce = 0 | a[8], de = 8191 & ce, fe = ce >>> 13, he = 0 | a[9], pe = 8191 & he, me = he >>> 13; | |
n.negative = e.negative ^ t.negative, | |
n.length = 19; | |
var be = (l + (r = Math.imul(d, H)) | 0) + ((8191 & (i = (i = Math.imul(d, z)) + Math.imul(f, H) | 0)) << 13) | 0; | |
l = ((o = Math.imul(f, z)) + (i >>> 13) | 0) + (be >>> 26) | 0, | |
be &= 67108863, | |
r = Math.imul(p, H), | |
i = (i = Math.imul(p, z)) + Math.imul(m, H) | 0, | |
o = Math.imul(m, z); | |
var ge = (l + (r = r + Math.imul(d, W) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, K) | 0) + Math.imul(f, W) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, K) | 0) + (i >>> 13) | 0) + (ge >>> 26) | 0, | |
ge &= 67108863, | |
r = Math.imul(g, H), | |
i = (i = Math.imul(g, z)) + Math.imul(y, H) | 0, | |
o = Math.imul(y, z), | |
r = r + Math.imul(p, W) | 0, | |
i = (i = i + Math.imul(p, K) | 0) + Math.imul(m, W) | 0, | |
o = o + Math.imul(m, K) | 0; | |
var ye = (l + (r = r + Math.imul(d, V) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, Q) | 0) + Math.imul(f, V) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, Q) | 0) + (i >>> 13) | 0) + (ye >>> 26) | 0, | |
ye &= 67108863, | |
r = Math.imul(_, H), | |
i = (i = Math.imul(_, z)) + Math.imul(w, H) | 0, | |
o = Math.imul(w, z), | |
r = r + Math.imul(g, W) | 0, | |
i = (i = i + Math.imul(g, K) | 0) + Math.imul(y, W) | 0, | |
o = o + Math.imul(y, K) | 0, | |
r = r + Math.imul(p, V) | 0, | |
i = (i = i + Math.imul(p, Q) | 0) + Math.imul(m, V) | 0, | |
o = o + Math.imul(m, Q) | 0; | |
var ve = (l + (r = r + Math.imul(d, Z) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, $) | 0) + Math.imul(f, Z) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, $) | 0) + (i >>> 13) | 0) + (ve >>> 26) | 0, | |
ve &= 67108863, | |
r = Math.imul(E, H), | |
i = (i = Math.imul(E, z)) + Math.imul(j, H) | 0, | |
o = Math.imul(j, z), | |
r = r + Math.imul(_, W) | 0, | |
i = (i = i + Math.imul(_, K) | 0) + Math.imul(w, W) | 0, | |
o = o + Math.imul(w, K) | 0, | |
r = r + Math.imul(g, V) | 0, | |
i = (i = i + Math.imul(g, Q) | 0) + Math.imul(y, V) | 0, | |
o = o + Math.imul(y, Q) | 0, | |
r = r + Math.imul(p, Z) | 0, | |
i = (i = i + Math.imul(p, $) | 0) + Math.imul(m, Z) | 0, | |
o = o + Math.imul(m, $) | 0; | |
var _e = (l + (r = r + Math.imul(d, J) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, ee) | 0) + Math.imul(f, J) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, ee) | 0) + (i >>> 13) | 0) + (_e >>> 26) | 0, | |
_e &= 67108863, | |
r = Math.imul(O, H), | |
i = (i = Math.imul(O, z)) + Math.imul(M, H) | 0, | |
o = Math.imul(M, z), | |
r = r + Math.imul(E, W) | 0, | |
i = (i = i + Math.imul(E, K) | 0) + Math.imul(j, W) | 0, | |
o = o + Math.imul(j, K) | 0, | |
r = r + Math.imul(_, V) | 0, | |
i = (i = i + Math.imul(_, Q) | 0) + Math.imul(w, V) | 0, | |
o = o + Math.imul(w, Q) | 0, | |
r = r + Math.imul(g, Z) | 0, | |
i = (i = i + Math.imul(g, $) | 0) + Math.imul(y, Z) | 0, | |
o = o + Math.imul(y, $) | 0, | |
r = r + Math.imul(p, J) | 0, | |
i = (i = i + Math.imul(p, ee) | 0) + Math.imul(m, J) | 0, | |
o = o + Math.imul(m, ee) | 0; | |
var we = (l + (r = r + Math.imul(d, ne) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, re) | 0) + Math.imul(f, ne) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, re) | 0) + (i >>> 13) | 0) + (we >>> 26) | 0, | |
we &= 67108863, | |
r = Math.imul(A, H), | |
i = (i = Math.imul(A, z)) + Math.imul(C, H) | 0, | |
o = Math.imul(C, z), | |
r = r + Math.imul(O, W) | 0, | |
i = (i = i + Math.imul(O, K) | 0) + Math.imul(M, W) | 0, | |
o = o + Math.imul(M, K) | 0, | |
r = r + Math.imul(E, V) | 0, | |
i = (i = i + Math.imul(E, Q) | 0) + Math.imul(j, V) | 0, | |
o = o + Math.imul(j, Q) | 0, | |
r = r + Math.imul(_, Z) | 0, | |
i = (i = i + Math.imul(_, $) | 0) + Math.imul(w, Z) | 0, | |
o = o + Math.imul(w, $) | 0, | |
r = r + Math.imul(g, J) | 0, | |
i = (i = i + Math.imul(g, ee) | 0) + Math.imul(y, J) | 0, | |
o = o + Math.imul(y, ee) | 0, | |
r = r + Math.imul(p, ne) | 0, | |
i = (i = i + Math.imul(p, re) | 0) + Math.imul(m, ne) | 0, | |
o = o + Math.imul(m, re) | 0; | |
var Se = (l + (r = r + Math.imul(d, oe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, se) | 0) + Math.imul(f, oe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, se) | 0) + (i >>> 13) | 0) + (Se >>> 26) | 0, | |
Se &= 67108863, | |
r = Math.imul(R, H), | |
i = (i = Math.imul(R, z)) + Math.imul(T, H) | 0, | |
o = Math.imul(T, z), | |
r = r + Math.imul(A, W) | 0, | |
i = (i = i + Math.imul(A, K) | 0) + Math.imul(C, W) | 0, | |
o = o + Math.imul(C, K) | 0, | |
r = r + Math.imul(O, V) | 0, | |
i = (i = i + Math.imul(O, Q) | 0) + Math.imul(M, V) | 0, | |
o = o + Math.imul(M, Q) | 0, | |
r = r + Math.imul(E, Z) | 0, | |
i = (i = i + Math.imul(E, $) | 0) + Math.imul(j, Z) | 0, | |
o = o + Math.imul(j, $) | 0, | |
r = r + Math.imul(_, J) | 0, | |
i = (i = i + Math.imul(_, ee) | 0) + Math.imul(w, J) | 0, | |
o = o + Math.imul(w, ee) | 0, | |
r = r + Math.imul(g, ne) | 0, | |
i = (i = i + Math.imul(g, re) | 0) + Math.imul(y, ne) | 0, | |
o = o + Math.imul(y, re) | 0, | |
r = r + Math.imul(p, oe) | 0, | |
i = (i = i + Math.imul(p, se) | 0) + Math.imul(m, oe) | 0, | |
o = o + Math.imul(m, se) | 0; | |
var Ee = (l + (r = r + Math.imul(d, ue) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, le) | 0) + Math.imul(f, ue) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, le) | 0) + (i >>> 13) | 0) + (Ee >>> 26) | 0, | |
Ee &= 67108863, | |
r = Math.imul(L, H), | |
i = (i = Math.imul(L, z)) + Math.imul(N, H) | 0, | |
o = Math.imul(N, z), | |
r = r + Math.imul(R, W) | 0, | |
i = (i = i + Math.imul(R, K) | 0) + Math.imul(T, W) | 0, | |
o = o + Math.imul(T, K) | 0, | |
r = r + Math.imul(A, V) | 0, | |
i = (i = i + Math.imul(A, Q) | 0) + Math.imul(C, V) | 0, | |
o = o + Math.imul(C, Q) | 0, | |
r = r + Math.imul(O, Z) | 0, | |
i = (i = i + Math.imul(O, $) | 0) + Math.imul(M, Z) | 0, | |
o = o + Math.imul(M, $) | 0, | |
r = r + Math.imul(E, J) | 0, | |
i = (i = i + Math.imul(E, ee) | 0) + Math.imul(j, J) | 0, | |
o = o + Math.imul(j, ee) | 0, | |
r = r + Math.imul(_, ne) | 0, | |
i = (i = i + Math.imul(_, re) | 0) + Math.imul(w, ne) | 0, | |
o = o + Math.imul(w, re) | 0, | |
r = r + Math.imul(g, oe) | 0, | |
i = (i = i + Math.imul(g, se) | 0) + Math.imul(y, oe) | 0, | |
o = o + Math.imul(y, se) | 0, | |
r = r + Math.imul(p, ue) | 0, | |
i = (i = i + Math.imul(p, le) | 0) + Math.imul(m, ue) | 0, | |
o = o + Math.imul(m, le) | 0; | |
var je = (l + (r = r + Math.imul(d, de) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, fe) | 0) + Math.imul(f, de) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, fe) | 0) + (i >>> 13) | 0) + (je >>> 26) | 0, | |
je &= 67108863, | |
r = Math.imul(D, H), | |
i = (i = Math.imul(D, z)) + Math.imul(U, H) | 0, | |
o = Math.imul(U, z), | |
r = r + Math.imul(L, W) | 0, | |
i = (i = i + Math.imul(L, K) | 0) + Math.imul(N, W) | 0, | |
o = o + Math.imul(N, K) | 0, | |
r = r + Math.imul(R, V) | 0, | |
i = (i = i + Math.imul(R, Q) | 0) + Math.imul(T, V) | 0, | |
o = o + Math.imul(T, Q) | 0, | |
r = r + Math.imul(A, Z) | 0, | |
i = (i = i + Math.imul(A, $) | 0) + Math.imul(C, Z) | 0, | |
o = o + Math.imul(C, $) | 0, | |
r = r + Math.imul(O, J) | 0, | |
i = (i = i + Math.imul(O, ee) | 0) + Math.imul(M, J) | 0, | |
o = o + Math.imul(M, ee) | 0, | |
r = r + Math.imul(E, ne) | 0, | |
i = (i = i + Math.imul(E, re) | 0) + Math.imul(j, ne) | 0, | |
o = o + Math.imul(j, re) | 0, | |
r = r + Math.imul(_, oe) | 0, | |
i = (i = i + Math.imul(_, se) | 0) + Math.imul(w, oe) | 0, | |
o = o + Math.imul(w, se) | 0, | |
r = r + Math.imul(g, ue) | 0, | |
i = (i = i + Math.imul(g, le) | 0) + Math.imul(y, ue) | 0, | |
o = o + Math.imul(y, le) | 0, | |
r = r + Math.imul(p, de) | 0, | |
i = (i = i + Math.imul(p, fe) | 0) + Math.imul(m, de) | 0, | |
o = o + Math.imul(m, fe) | 0; | |
var xe = (l + (r = r + Math.imul(d, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(d, me) | 0) + Math.imul(f, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(f, me) | 0) + (i >>> 13) | 0) + (xe >>> 26) | 0, | |
xe &= 67108863, | |
r = Math.imul(D, W), | |
i = (i = Math.imul(D, K)) + Math.imul(U, W) | 0, | |
o = Math.imul(U, K), | |
r = r + Math.imul(L, V) | 0, | |
i = (i = i + Math.imul(L, Q) | 0) + Math.imul(N, V) | 0, | |
o = o + Math.imul(N, Q) | 0, | |
r = r + Math.imul(R, Z) | 0, | |
i = (i = i + Math.imul(R, $) | 0) + Math.imul(T, Z) | 0, | |
o = o + Math.imul(T, $) | 0, | |
r = r + Math.imul(A, J) | 0, | |
i = (i = i + Math.imul(A, ee) | 0) + Math.imul(C, J) | 0, | |
o = o + Math.imul(C, ee) | 0, | |
r = r + Math.imul(O, ne) | 0, | |
i = (i = i + Math.imul(O, re) | 0) + Math.imul(M, ne) | 0, | |
o = o + Math.imul(M, re) | 0, | |
r = r + Math.imul(E, oe) | 0, | |
i = (i = i + Math.imul(E, se) | 0) + Math.imul(j, oe) | 0, | |
o = o + Math.imul(j, se) | 0, | |
r = r + Math.imul(_, ue) | 0, | |
i = (i = i + Math.imul(_, le) | 0) + Math.imul(w, ue) | 0, | |
o = o + Math.imul(w, le) | 0, | |
r = r + Math.imul(g, de) | 0, | |
i = (i = i + Math.imul(g, fe) | 0) + Math.imul(y, de) | 0, | |
o = o + Math.imul(y, fe) | 0; | |
var Oe = (l + (r = r + Math.imul(p, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(p, me) | 0) + Math.imul(m, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(m, me) | 0) + (i >>> 13) | 0) + (Oe >>> 26) | 0, | |
Oe &= 67108863, | |
r = Math.imul(D, V), | |
i = (i = Math.imul(D, Q)) + Math.imul(U, V) | 0, | |
o = Math.imul(U, Q), | |
r = r + Math.imul(L, Z) | 0, | |
i = (i = i + Math.imul(L, $) | 0) + Math.imul(N, Z) | 0, | |
o = o + Math.imul(N, $) | 0, | |
r = r + Math.imul(R, J) | 0, | |
i = (i = i + Math.imul(R, ee) | 0) + Math.imul(T, J) | 0, | |
o = o + Math.imul(T, ee) | 0, | |
r = r + Math.imul(A, ne) | 0, | |
i = (i = i + Math.imul(A, re) | 0) + Math.imul(C, ne) | 0, | |
o = o + Math.imul(C, re) | 0, | |
r = r + Math.imul(O, oe) | 0, | |
i = (i = i + Math.imul(O, se) | 0) + Math.imul(M, oe) | 0, | |
o = o + Math.imul(M, se) | 0, | |
r = r + Math.imul(E, ue) | 0, | |
i = (i = i + Math.imul(E, le) | 0) + Math.imul(j, ue) | 0, | |
o = o + Math.imul(j, le) | 0, | |
r = r + Math.imul(_, de) | 0, | |
i = (i = i + Math.imul(_, fe) | 0) + Math.imul(w, de) | 0, | |
o = o + Math.imul(w, fe) | 0; | |
var Me = (l + (r = r + Math.imul(g, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(g, me) | 0) + Math.imul(y, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(y, me) | 0) + (i >>> 13) | 0) + (Me >>> 26) | 0, | |
Me &= 67108863, | |
r = Math.imul(D, Z), | |
i = (i = Math.imul(D, $)) + Math.imul(U, Z) | 0, | |
o = Math.imul(U, $), | |
r = r + Math.imul(L, J) | 0, | |
i = (i = i + Math.imul(L, ee) | 0) + Math.imul(N, J) | 0, | |
o = o + Math.imul(N, ee) | 0, | |
r = r + Math.imul(R, ne) | 0, | |
i = (i = i + Math.imul(R, re) | 0) + Math.imul(T, ne) | 0, | |
o = o + Math.imul(T, re) | 0, | |
r = r + Math.imul(A, oe) | 0, | |
i = (i = i + Math.imul(A, se) | 0) + Math.imul(C, oe) | 0, | |
o = o + Math.imul(C, se) | 0, | |
r = r + Math.imul(O, ue) | 0, | |
i = (i = i + Math.imul(O, le) | 0) + Math.imul(M, ue) | 0, | |
o = o + Math.imul(M, le) | 0, | |
r = r + Math.imul(E, de) | 0, | |
i = (i = i + Math.imul(E, fe) | 0) + Math.imul(j, de) | 0, | |
o = o + Math.imul(j, fe) | 0; | |
var ke = (l + (r = r + Math.imul(_, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(_, me) | 0) + Math.imul(w, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(w, me) | 0) + (i >>> 13) | 0) + (ke >>> 26) | 0, | |
ke &= 67108863, | |
r = Math.imul(D, J), | |
i = (i = Math.imul(D, ee)) + Math.imul(U, J) | 0, | |
o = Math.imul(U, ee), | |
r = r + Math.imul(L, ne) | 0, | |
i = (i = i + Math.imul(L, re) | 0) + Math.imul(N, ne) | 0, | |
o = o + Math.imul(N, re) | 0, | |
r = r + Math.imul(R, oe) | 0, | |
i = (i = i + Math.imul(R, se) | 0) + Math.imul(T, oe) | 0, | |
o = o + Math.imul(T, se) | 0, | |
r = r + Math.imul(A, ue) | 0, | |
i = (i = i + Math.imul(A, le) | 0) + Math.imul(C, ue) | 0, | |
o = o + Math.imul(C, le) | 0, | |
r = r + Math.imul(O, de) | 0, | |
i = (i = i + Math.imul(O, fe) | 0) + Math.imul(M, de) | 0, | |
o = o + Math.imul(M, fe) | 0; | |
var Ae = (l + (r = r + Math.imul(E, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(E, me) | 0) + Math.imul(j, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(j, me) | 0) + (i >>> 13) | 0) + (Ae >>> 26) | 0, | |
Ae &= 67108863, | |
r = Math.imul(D, ne), | |
i = (i = Math.imul(D, re)) + Math.imul(U, ne) | 0, | |
o = Math.imul(U, re), | |
r = r + Math.imul(L, oe) | 0, | |
i = (i = i + Math.imul(L, se) | 0) + Math.imul(N, oe) | 0, | |
o = o + Math.imul(N, se) | 0, | |
r = r + Math.imul(R, ue) | 0, | |
i = (i = i + Math.imul(R, le) | 0) + Math.imul(T, ue) | 0, | |
o = o + Math.imul(T, le) | 0, | |
r = r + Math.imul(A, de) | 0, | |
i = (i = i + Math.imul(A, fe) | 0) + Math.imul(C, de) | 0, | |
o = o + Math.imul(C, fe) | 0; | |
var Ce = (l + (r = r + Math.imul(O, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(O, me) | 0) + Math.imul(M, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(M, me) | 0) + (i >>> 13) | 0) + (Ce >>> 26) | 0, | |
Ce &= 67108863, | |
r = Math.imul(D, oe), | |
i = (i = Math.imul(D, se)) + Math.imul(U, oe) | 0, | |
o = Math.imul(U, se), | |
r = r + Math.imul(L, ue) | 0, | |
i = (i = i + Math.imul(L, le) | 0) + Math.imul(N, ue) | 0, | |
o = o + Math.imul(N, le) | 0, | |
r = r + Math.imul(R, de) | 0, | |
i = (i = i + Math.imul(R, fe) | 0) + Math.imul(T, de) | 0, | |
o = o + Math.imul(T, fe) | 0; | |
var Ie = (l + (r = r + Math.imul(A, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(A, me) | 0) + Math.imul(C, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(C, me) | 0) + (i >>> 13) | 0) + (Ie >>> 26) | 0, | |
Ie &= 67108863, | |
r = Math.imul(D, ue), | |
i = (i = Math.imul(D, le)) + Math.imul(U, ue) | 0, | |
o = Math.imul(U, le), | |
r = r + Math.imul(L, de) | 0, | |
i = (i = i + Math.imul(L, fe) | 0) + Math.imul(N, de) | 0, | |
o = o + Math.imul(N, fe) | 0; | |
var Re = (l + (r = r + Math.imul(R, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(R, me) | 0) + Math.imul(T, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(T, me) | 0) + (i >>> 13) | 0) + (Re >>> 26) | 0, | |
Re &= 67108863, | |
r = Math.imul(D, de), | |
i = (i = Math.imul(D, fe)) + Math.imul(U, de) | 0, | |
o = Math.imul(U, fe); | |
var Te = (l + (r = r + Math.imul(L, pe) | 0) | 0) + ((8191 & (i = (i = i + Math.imul(L, me) | 0) + Math.imul(N, pe) | 0)) << 13) | 0; | |
l = ((o = o + Math.imul(N, me) | 0) + (i >>> 13) | 0) + (Te >>> 26) | 0, | |
Te &= 67108863; | |
var Pe = (l + (r = Math.imul(D, pe)) | 0) + ((8191 & (i = (i = Math.imul(D, me)) + Math.imul(U, pe) | 0)) << 13) | 0; | |
return l = ((o = Math.imul(U, me)) + (i >>> 13) | 0) + (Pe >>> 26) | 0, | |
Pe &= 67108863, | |
u[0] = be, | |
u[1] = ge, | |
u[2] = ye, | |
u[3] = ve, | |
u[4] = _e, | |
u[5] = we, | |
u[6] = Se, | |
u[7] = Ee, | |
u[8] = je, | |
u[9] = xe, | |
u[10] = Oe, | |
u[11] = Me, | |
u[12] = ke, | |
u[13] = Ae, | |
u[14] = Ce, | |
u[15] = Ie, | |
u[16] = Re, | |
u[17] = Te, | |
u[18] = Pe, | |
0 !== l && (u[19] = l, | |
n.length++), | |
n | |
}; | |
function p(e, t, n) { | |
return (new m).mulp(e, t, n) | |
} | |
function m(e, t) { | |
this.x = e, | |
this.y = t | |
} | |
Math.imul || (h = f), | |
o.prototype.mulTo = function(e, t) { | |
var n = this.length + e.length; | |
return 10 === this.length && 10 === e.length ? h(this, e, t) : n < 63 ? f(this, e, t) : n < 1024 ? function(e, t, n) { | |
n.negative = t.negative ^ e.negative, | |
n.length = e.length + t.length; | |
for (var r = 0, i = 0, o = 0; o < n.length - 1; o++) { | |
var s = i; | |
i = 0; | |
for (var a = 67108863 & r, u = Math.min(o, t.length - 1), l = Math.max(0, o - e.length + 1); l <= u; l++) { | |
var c = o - l | |
, d = (0 | e.words[c]) * (0 | t.words[l]) | |
, f = 67108863 & d; | |
a = 67108863 & (f = f + a | 0), | |
i += (s = (s = s + (d / 67108864 | 0) | 0) + (f >>> 26) | 0) >>> 26, | |
s &= 67108863 | |
} | |
n.words[o] = a, | |
r = s, | |
s = i | |
} | |
return 0 !== r ? n.words[o] = r : n.length--, | |
n.strip() | |
}(this, e, t) : p(this, e, t) | |
} | |
, | |
m.prototype.makeRBT = function(e) { | |
for (var t = new Array(e), n = o.prototype._countBits(e) - 1, r = 0; r < e; r++) | |
t[r] = this.revBin(r, n, e); | |
return t | |
} | |
, | |
m.prototype.revBin = function(e, t, n) { | |
if (0 === e || e === n - 1) | |
return e; | |
for (var r = 0, i = 0; i < t; i++) | |
r |= (1 & e) << t - i - 1, | |
e >>= 1; | |
return r | |
} | |
, | |
m.prototype.permute = function(e, t, n, r, i, o) { | |
for (var s = 0; s < o; s++) | |
r[s] = t[e[s]], | |
i[s] = n[e[s]] | |
} | |
, | |
m.prototype.transform = function(e, t, n, r, i, o) { | |
this.permute(o, e, t, n, r, i); | |
for (var s = 1; s < i; s <<= 1) | |
for (var a = s << 1, u = Math.cos(2 * Math.PI / a), l = Math.sin(2 * Math.PI / a), c = 0; c < i; c += a) | |
for (var d = u, f = l, h = 0; h < s; h++) { | |
var p = n[c + h] | |
, m = r[c + h] | |
, b = n[c + h + s] | |
, g = r[c + h + s] | |
, y = d * b - f * g; | |
g = d * g + f * b, | |
b = y, | |
n[c + h] = p + b, | |
r[c + h] = m + g, | |
n[c + h + s] = p - b, | |
r[c + h + s] = m - g, | |
h !== a && (y = u * d - l * f, | |
f = u * f + l * d, | |
d = y) | |
} | |
} | |
, | |
m.prototype.guessLen13b = function(e, t) { | |
var n = 1 | Math.max(t, e) | |
, r = 1 & n | |
, i = 0; | |
for (n = n / 2 | 0; n; n >>>= 1) | |
i++; | |
return 1 << i + 1 + r | |
} | |
, | |
m.prototype.conjugate = function(e, t, n) { | |
if (!(n <= 1)) | |
for (var r = 0; r < n / 2; r++) { | |
var i = e[r]; | |
e[r] = e[n - r - 1], | |
e[n - r - 1] = i, | |
i = t[r], | |
t[r] = -t[n - r - 1], | |
t[n - r - 1] = -i | |
} | |
} | |
, | |
m.prototype.normalize13b = function(e, t) { | |
for (var n = 0, r = 0; r < t / 2; r++) { | |
var i = 8192 * Math.round(e[2 * r + 1] / t) + Math.round(e[2 * r] / t) + n; | |
e[r] = 67108863 & i, | |
n = i < 67108864 ? 0 : i / 67108864 | 0 | |
} | |
return e | |
} | |
, | |
m.prototype.convert13b = function(e, t, n, i) { | |
for (var o = 0, s = 0; s < t; s++) | |
o += 0 | e[s], | |
n[2 * s] = 8191 & o, | |
o >>>= 13, | |
n[2 * s + 1] = 8191 & o, | |
o >>>= 13; | |
for (s = 2 * t; s < i; ++s) | |
n[s] = 0; | |
r(0 === o), | |
r(0 == (-8192 & o)) | |
} | |
, | |
m.prototype.stub = function(e) { | |
for (var t = new Array(e), n = 0; n < e; n++) | |
t[n] = 0; | |
return t | |
} | |
, | |
m.prototype.mulp = function(e, t, n) { | |
var r = 2 * this.guessLen13b(e.length, t.length) | |
, i = this.makeRBT(r) | |
, o = this.stub(r) | |
, s = new Array(r) | |
, a = new Array(r) | |
, u = new Array(r) | |
, l = new Array(r) | |
, c = new Array(r) | |
, d = new Array(r) | |
, f = n.words; | |
f.length = r, | |
this.convert13b(e.words, e.length, s, r), | |
this.convert13b(t.words, t.length, l, r), | |
this.transform(s, o, a, u, r, i), | |
this.transform(l, o, c, d, r, i); | |
for (var h = 0; h < r; h++) { | |
var p = a[h] * c[h] - u[h] * d[h]; | |
u[h] = a[h] * d[h] + u[h] * c[h], | |
a[h] = p | |
} | |
return this.conjugate(a, u, r), | |
this.transform(a, u, f, o, r, i), | |
this.conjugate(f, o, r), | |
this.normalize13b(f, r), | |
n.negative = e.negative ^ t.negative, | |
n.length = e.length + t.length, | |
n.strip() | |
} | |
, | |
o.prototype.mul = function(e) { | |
var t = new o(null); | |
return t.words = new Array(this.length + e.length), | |
this.mulTo(e, t) | |
} | |
, | |
o.prototype.mulf = function(e) { | |
var t = new o(null); | |
return t.words = new Array(this.length + e.length), | |
p(this, e, t) | |
} | |
, | |
o.prototype.imul = function(e) { | |
return this.clone().mulTo(e, this) | |
} | |
, | |
o.prototype.imuln = function(e) { | |
r("number" == typeof e), | |
r(e < 67108864); | |
for (var t = 0, n = 0; n < this.length; n++) { | |
var i = (0 | this.words[n]) * e | |
, o = (67108863 & i) + (67108863 & t); | |
t >>= 26, | |
t += i / 67108864 | 0, | |
t += o >>> 26, | |
this.words[n] = 67108863 & o | |
} | |
return 0 !== t && (this.words[n] = t, | |
this.length++), | |
this | |
} | |
, | |
o.prototype.muln = function(e) { | |
return this.clone().imuln(e) | |
} | |
, | |
o.prototype.sqr = function() { | |
return this.mul(this) | |
} | |
, | |
o.prototype.isqr = function() { | |
return this.imul(this.clone()) | |
} | |
, | |
o.prototype.pow = function(e) { | |
var t = function(e) { | |
for (var t = new Array(e.bitLength()), n = 0; n < t.length; n++) { | |
var r = n / 26 | 0 | |
, i = n % 26; | |
t[n] = (e.words[r] & 1 << i) >>> i | |
} | |
return t | |
}(e); | |
if (0 === t.length) | |
return new o(1); | |
for (var n = this, r = 0; r < t.length && 0 === t[r]; r++, | |
n = n.sqr()) | |
; | |
if (++r < t.length) | |
for (var i = n.sqr(); r < t.length; r++, | |
i = i.sqr()) | |
0 !== t[r] && (n = n.mul(i)); | |
return n | |
} | |
, | |
o.prototype.iushln = function(e) { | |
r("number" == typeof e && e >= 0); | |
var t, n = e % 26, i = (e - n) / 26, o = 67108863 >>> 26 - n << 26 - n; | |
if (0 !== n) { | |
var s = 0; | |
for (t = 0; t < this.length; t++) { | |
var a = this.words[t] & o | |
, u = (0 | this.words[t]) - a << n; | |
this.words[t] = u | s, | |
s = a >>> 26 - n | |
} | |
s && (this.words[t] = s, | |
this.length++) | |
} | |
if (0 !== i) { | |
for (t = this.length - 1; t >= 0; t--) | |
this.words[t + i] = this.words[t]; | |
for (t = 0; t < i; t++) | |
this.words[t] = 0; | |
this.length += i | |
} | |
return this.strip() | |
} | |
, | |
o.prototype.ishln = function(e) { | |
return r(0 === this.negative), | |
this.iushln(e) | |
} | |
, | |
o.prototype.iushrn = function(e, t, n) { | |
var i; | |
r("number" == typeof e && e >= 0), | |
i = t ? (t - t % 26) / 26 : 0; | |
var o = e % 26 | |
, s = Math.min((e - o) / 26, this.length) | |
, a = 67108863 ^ 67108863 >>> o << o | |
, u = n; | |
if (i -= s, | |
i = Math.max(0, i), | |
u) { | |
for (var l = 0; l < s; l++) | |
u.words[l] = this.words[l]; | |
u.length = s | |
} | |
if (0 === s) | |
; | |
else if (this.length > s) | |
for (this.length -= s, | |
l = 0; l < this.length; l++) | |
this.words[l] = this.words[l + s]; | |
else | |
this.words[0] = 0, | |
this.length = 1; | |
var c = 0; | |
for (l = this.length - 1; l >= 0 && (0 !== c || l >= i); l--) { | |
var d = 0 | this.words[l]; | |
this.words[l] = c << 26 - o | d >>> o, | |
c = d & a | |
} | |
return u && 0 !== c && (u.words[u.length++] = c), | |
0 === this.length && (this.words[0] = 0, | |
this.length = 1), | |
this.strip() | |
} | |
, | |
o.prototype.ishrn = function(e, t, n) { | |
return r(0 === this.negative), | |
this.iushrn(e, t, n) | |
} | |
, | |
o.prototype.shln = function(e) { | |
return this.clone().ishln(e) | |
} | |
, | |
o.prototype.ushln = function(e) { | |
return this.clone().iushln(e) | |
} | |
, | |
o.prototype.shrn = function(e) { | |
return this.clone().ishrn(e) | |
} | |
, | |
o.prototype.ushrn = function(e) { | |
return this.clone().iushrn(e) | |
} | |
, | |
o.prototype.testn = function(e) { | |
r("number" == typeof e && e >= 0); | |
var t = e % 26 | |
, n = (e - t) / 26 | |
, i = 1 << t; | |
return !(this.length <= n) && !!(this.words[n] & i) | |
} | |
, | |
o.prototype.imaskn = function(e) { | |
r("number" == typeof e && e >= 0); | |
var t = e % 26 | |
, n = (e - t) / 26; | |
if (r(0 === this.negative, "imaskn works only with positive numbers"), | |
this.length <= n) | |
return this; | |
if (0 !== t && n++, | |
this.length = Math.min(n, this.length), | |
0 !== t) { | |
var i = 67108863 ^ 67108863 >>> t << t; | |
this.words[this.length - 1] &= i | |
} | |
return this.strip() | |
} | |
, | |
o.prototype.maskn = function(e) { | |
return this.clone().imaskn(e) | |
} | |
, | |
o.prototype.iaddn = function(e) { | |
return r("number" == typeof e), | |
r(e < 67108864), | |
e < 0 ? this.isubn(-e) : 0 !== this.negative ? 1 === this.length && (0 | this.words[0]) < e ? (this.words[0] = e - (0 | this.words[0]), | |
this.negative = 0, | |
this) : (this.negative = 0, | |
this.isubn(e), | |
this.negative = 1, | |
this) : this._iaddn(e) | |
} | |
, | |
o.prototype._iaddn = function(e) { | |
this.words[0] += e; | |
for (var t = 0; t < this.length && this.words[t] >= 67108864; t++) | |
this.words[t] -= 67108864, | |
t === this.length - 1 ? this.words[t + 1] = 1 : this.words[t + 1]++; | |
return this.length = Math.max(this.length, t + 1), | |
this | |
} | |
, | |
o.prototype.isubn = function(e) { | |
if (r("number" == typeof e), | |
r(e < 67108864), | |
e < 0) | |
return this.iaddn(-e); | |
if (0 !== this.negative) | |
return this.negative = 0, | |
this.iaddn(e), | |
this.negative = 1, | |
this; | |
if (this.words[0] -= e, | |
1 === this.length && this.words[0] < 0) | |
this.words[0] = -this.words[0], | |
this.negative = 1; | |
else | |
for (var t = 0; t < this.length && this.words[t] < 0; t++) | |
this.words[t] += 67108864, | |
this.words[t + 1] -= 1; | |
return this.strip() | |
} | |
, | |
o.prototype.addn = function(e) { | |
return this.clone().iaddn(e) | |
} | |
, | |
o.prototype.subn = function(e) { | |
return this.clone().isubn(e) | |
} | |
, | |
o.prototype.iabs = function() { | |
return this.negative = 0, | |
this | |
} | |
, | |
o.prototype.abs = function() { | |
return this.clone().iabs() | |
} | |
, | |
o.prototype._ishlnsubmul = function(e, t, n) { | |
var i, o, s = e.length + n; | |
this._expand(s); | |
var a = 0; | |
for (i = 0; i < e.length; i++) { | |
o = (0 | this.words[i + n]) + a; | |
var u = (0 | e.words[i]) * t; | |
a = ((o -= 67108863 & u) >> 26) - (u / 67108864 | 0), | |
this.words[i + n] = 67108863 & o | |
} | |
for (; i < this.length - n; i++) | |
a = (o = (0 | this.words[i + n]) + a) >> 26, | |
this.words[i + n] = 67108863 & o; | |
if (0 === a) | |
return this.strip(); | |
for (r(-1 === a), | |
a = 0, | |
i = 0; i < this.length; i++) | |
a = (o = -(0 | this.words[i]) + a) >> 26, | |
this.words[i] = 67108863 & o; | |
return this.negative = 1, | |
this.strip() | |
} | |
, | |
o.prototype._wordDiv = function(e, t) { | |
var n = (this.length, | |
e.length) | |
, r = this.clone() | |
, i = e | |
, s = 0 | i.words[i.length - 1]; | |
0 !== (n = 26 - this._countBits(s)) && (i = i.ushln(n), | |
r.iushln(n), | |
s = 0 | i.words[i.length - 1]); | |
var a, u = r.length - i.length; | |
if ("mod" !== t) { | |
(a = new o(null)).length = u + 1, | |
a.words = new Array(a.length); | |
for (var l = 0; l < a.length; l++) | |
a.words[l] = 0 | |
} | |
var c = r.clone()._ishlnsubmul(i, 1, u); | |
0 === c.negative && (r = c, | |
a && (a.words[u] = 1)); | |
for (var d = u - 1; d >= 0; d--) { | |
var f = 67108864 * (0 | r.words[i.length + d]) + (0 | r.words[i.length + d - 1]); | |
for (f = Math.min(f / s | 0, 67108863), | |
r._ishlnsubmul(i, f, d); 0 !== r.negative; ) | |
f--, | |
r.negative = 0, | |
r._ishlnsubmul(i, 1, d), | |
r.isZero() || (r.negative ^= 1); | |
a && (a.words[d] = f) | |
} | |
return a && a.strip(), | |
r.strip(), | |
"div" !== t && 0 !== n && r.iushrn(n), | |
{ | |
div: a || null, | |
mod: r | |
} | |
} | |
, | |
o.prototype.divmod = function(e, t, n) { | |
return r(!e.isZero()), | |
this.isZero() ? { | |
div: new o(0), | |
mod: new o(0) | |
} : 0 !== this.negative && 0 === e.negative ? (a = this.neg().divmod(e, t), | |
"mod" !== t && (i = a.div.neg()), | |
"div" !== t && (s = a.mod.neg(), | |
n && 0 !== s.negative && s.iadd(e)), | |
{ | |
div: i, | |
mod: s | |
}) : 0 === this.negative && 0 !== e.negative ? (a = this.divmod(e.neg(), t), | |
"mod" !== t && (i = a.div.neg()), | |
{ | |
div: i, | |
mod: a.mod | |
}) : 0 != (this.negative & e.negative) ? (a = this.neg().divmod(e.neg(), t), | |
"div" !== t && (s = a.mod.neg(), | |
n && 0 !== s.negative && s.isub(e)), | |
{ | |
div: a.div, | |
mod: s | |
}) : e.length > this.length || this.cmp(e) < 0 ? { | |
div: new o(0), | |
mod: this | |
} : 1 === e.length ? "div" === t ? { | |
div: this.divn(e.words[0]), | |
mod: null | |
} : "mod" === t ? { | |
div: null, | |
mod: new o(this.modn(e.words[0])) | |
} : { | |
div: this.divn(e.words[0]), | |
mod: new o(this.modn(e.words[0])) | |
} : this._wordDiv(e, t); | |
var i, s, a | |
} | |
, | |
o.prototype.div = function(e) { | |
return this.divmod(e, "div", !1).div | |
} | |
, | |
o.prototype.mod = function(e) { | |
return this.divmod(e, "mod", !1).mod | |
} | |
, | |
o.prototype.umod = function(e) { | |
return this.divmod(e, "mod", !0).mod | |
} | |
, | |
o.prototype.divRound = function(e) { | |
var t = this.divmod(e); | |
if (t.mod.isZero()) | |
return t.div; | |
var n = 0 !== t.div.negative ? t.mod.isub(e) : t.mod | |
, r = e.ushrn(1) | |
, i = e.andln(1) | |
, o = n.cmp(r); | |
return o < 0 || 1 === i && 0 === o ? t.div : 0 !== t.div.negative ? t.div.isubn(1) : t.div.iaddn(1) | |
} | |
, | |
o.prototype.modn = function(e) { | |
r(e <= 67108863); | |
for (var t = (1 << 26) % e, n = 0, i = this.length - 1; i >= 0; i--) | |
n = (t * n + (0 | this.words[i])) % e; | |
return n | |
} | |
, | |
o.prototype.idivn = function(e) { | |
r(e <= 67108863); | |
for (var t = 0, n = this.length - 1; n >= 0; n--) { | |
var i = (0 | this.words[n]) + 67108864 * t; | |
this.words[n] = i / e | 0, | |
t = i % e | |
} | |
return this.strip() | |
} | |
, | |
o.prototype.divn = function(e) { | |
return this.clone().idivn(e) | |
} | |
, | |
o.prototype.egcd = function(e) { | |
r(0 === e.negative), | |
r(!e.isZero()); | |
var t = this | |
, n = e.clone(); | |
t = 0 !== t.negative ? t.umod(e) : t.clone(); | |
for (var i = new o(1), s = new o(0), a = new o(0), u = new o(1), l = 0; t.isEven() && n.isEven(); ) | |
t.iushrn(1), | |
n.iushrn(1), | |
++l; | |
for (var c = n.clone(), d = t.clone(); !t.isZero(); ) { | |
for (var f = 0, h = 1; 0 == (t.words[0] & h) && f < 26; ++f, | |
h <<= 1) | |
; | |
if (f > 0) | |
for (t.iushrn(f); f-- > 0; ) | |
(i.isOdd() || s.isOdd()) && (i.iadd(c), | |
s.isub(d)), | |
i.iushrn(1), | |
s.iushrn(1); | |
for (var p = 0, m = 1; 0 == (n.words[0] & m) && p < 26; ++p, | |
m <<= 1) | |
; | |
if (p > 0) | |
for (n.iushrn(p); p-- > 0; ) | |
(a.isOdd() || u.isOdd()) && (a.iadd(c), | |
u.isub(d)), | |
a.iushrn(1), | |
u.iushrn(1); | |
t.cmp(n) >= 0 ? (t.isub(n), | |
i.isub(a), | |
s.isub(u)) : (n.isub(t), | |
a.isub(i), | |
u.isub(s)) | |
} | |
return { | |
a: a, | |
b: u, | |
gcd: n.iushln(l) | |
} | |
} | |
, | |
o.prototype._invmp = function(e) { | |
r(0 === e.negative), | |
r(!e.isZero()); | |
var t = this | |
, n = e.clone(); | |
t = 0 !== t.negative ? t.umod(e) : t.clone(); | |
for (var i, s = new o(1), a = new o(0), u = n.clone(); t.cmpn(1) > 0 && n.cmpn(1) > 0; ) { | |
for (var l = 0, c = 1; 0 == (t.words[0] & c) && l < 26; ++l, | |
c <<= 1) | |
; | |
if (l > 0) | |
for (t.iushrn(l); l-- > 0; ) | |
s.isOdd() && s.iadd(u), | |
s.iushrn(1); | |
for (var d = 0, f = 1; 0 == (n.words[0] & f) && d < 26; ++d, | |
f <<= 1) | |
; | |
if (d > 0) | |
for (n.iushrn(d); d-- > 0; ) | |
a.isOdd() && a.iadd(u), | |
a.iushrn(1); | |
t.cmp(n) >= 0 ? (t.isub(n), | |
s.isub(a)) : (n.isub(t), | |
a.isub(s)) | |
} | |
return (i = 0 === t.cmpn(1) ? s : a).cmpn(0) < 0 && i.iadd(e), | |
i | |
} | |
, | |
o.prototype.gcd = function(e) { | |
if (this.isZero()) | |
return e.abs(); | |
if (e.isZero()) | |
return this.abs(); | |
var t = this.clone() | |
, n = e.clone(); | |
t.negative = 0, | |
n.negative = 0; | |
for (var r = 0; t.isEven() && n.isEven(); r++) | |
t.iushrn(1), | |
n.iushrn(1); | |
for (; ; ) { | |
for (; t.isEven(); ) | |
t.iushrn(1); | |
for (; n.isEven(); ) | |
n.iushrn(1); | |
var i = t.cmp(n); | |
if (i < 0) { | |
var o = t; | |
t = n, | |
n = o | |
} else if (0 === i || 0 === n.cmpn(1)) | |
break; | |
t.isub(n) | |
} | |
return n.iushln(r) | |
} | |
, | |
o.prototype.invm = function(e) { | |
return this.egcd(e).a.umod(e) | |
} | |
, | |
o.prototype.isEven = function() { | |
return 0 == (1 & this.words[0]) | |
} | |
, | |
o.prototype.isOdd = function() { | |
return 1 == (1 & this.words[0]) | |
} | |
, | |
o.prototype.andln = function(e) { | |
return this.words[0] & e | |
} | |
, | |
o.prototype.bincn = function(e) { | |
r("number" == typeof e); | |
var t = e % 26 | |
, n = (e - t) / 26 | |
, i = 1 << t; | |
if (this.length <= n) | |
return this._expand(n + 1), | |
this.words[n] |= i, | |
this; | |
for (var o = i, s = n; 0 !== o && s < this.length; s++) { | |
var a = 0 | this.words[s]; | |
o = (a += o) >>> 26, | |
a &= 67108863, | |
this.words[s] = a | |
} | |
return 0 !== o && (this.words[s] = o, | |
this.length++), | |
this | |
} | |
, | |
o.prototype.isZero = function() { | |
return 1 === this.length && 0 === this.words[0] | |
} | |
, | |
o.prototype.cmpn = function(e) { | |
var t, n = e < 0; | |
if (0 !== this.negative && !n) | |
return -1; | |
if (0 === this.negative && n) | |
return 1; | |
if (this.strip(), | |
this.length > 1) | |
t = 1; | |
else { | |
n && (e = -e), | |
r(e <= 67108863, "Number is too big"); | |
var i = 0 | this.words[0]; | |
t = i === e ? 0 : i < e ? -1 : 1 | |
} | |
return 0 !== this.negative ? 0 | -t : t | |
} | |
, | |
o.prototype.cmp = function(e) { | |
if (0 !== this.negative && 0 === e.negative) | |
return -1; | |
if (0 === this.negative && 0 !== e.negative) | |
return 1; | |
var t = this.ucmp(e); | |
return 0 !== this.negative ? 0 | -t : t | |
} | |
, | |
o.prototype.ucmp = function(e) { | |
if (this.length > e.length) | |
return 1; | |
if (this.length < e.length) | |
return -1; | |
for (var t = 0, n = this.length - 1; n >= 0; n--) { | |
var r = 0 | this.words[n] | |
, i = 0 | e.words[n]; | |
if (r !== i) { | |
r < i ? t = -1 : r > i && (t = 1); | |
break | |
} | |
} | |
return t | |
} | |
, | |
o.prototype.gtn = function(e) { | |
return 1 === this.cmpn(e) | |
} | |
, | |
o.prototype.gt = function(e) { | |
return 1 === this.cmp(e) | |
} | |
, | |
o.prototype.gten = function(e) { | |
return this.cmpn(e) >= 0 | |
} | |
, | |
o.prototype.gte = function(e) { | |
return this.cmp(e) >= 0 | |
} | |
, | |
o.prototype.ltn = function(e) { | |
return -1 === this.cmpn(e) | |
} | |
, | |
o.prototype.lt = function(e) { | |
return -1 === this.cmp(e) | |
} | |
, | |
o.prototype.lten = function(e) { | |
return this.cmpn(e) <= 0 | |
} | |
, | |
o.prototype.lte = function(e) { | |
return this.cmp(e) <= 0 | |
} | |
, | |
o.prototype.eqn = function(e) { | |
return 0 === this.cmpn(e) | |
} | |
, | |
o.prototype.eq = function(e) { | |
return 0 === this.cmp(e) | |
} | |
, | |
o.red = function(e) { | |
return new S(e) | |
} | |
, | |
o.prototype.toRed = function(e) { | |
return r(!this.red, "Already a number in reduction context"), | |
r(0 === this.negative, "red works only with positives"), | |
e.convertTo(this)._forceRed(e) | |
} | |
, | |
o.prototype.fromRed = function() { | |
return r(this.red, "fromRed works only with numbers in reduction context"), | |
this.red.convertFrom(this) | |
} | |
, | |
o.prototype._forceRed = function(e) { | |
return this.red = e, | |
this | |
} | |
, | |
o.prototype.forceRed = function(e) { | |
return r(!this.red, "Already a number in reduction context"), | |
this._forceRed(e) | |
} | |
, | |
o.prototype.redAdd = function(e) { | |
return r(this.red, "redAdd works only with red numbers"), | |
this.red.add(this, e) | |
} | |
, | |
o.prototype.redIAdd = function(e) { | |
return r(this.red, "redIAdd works only with red numbers"), | |
this.red.iadd(this, e) | |
} | |
, | |
o.prototype.redSub = function(e) { | |
return r(this.red, "redSub works only with red numbers"), | |
this.red.sub(this, e) | |
} | |
, | |
o.prototype.redISub = function(e) { | |
return r(this.red, "redISub works only with red numbers"), | |
this.red.isub(this, e) | |
} | |
, | |
o.prototype.redShl = function(e) { | |
return r(this.red, "redShl works only with red numbers"), | |
this.red.shl(this, e) | |
} | |
, | |
o.prototype.redMul = function(e) { | |
return r(this.red, "redMul works only with red numbers"), | |
this.red._verify2(this, e), | |
this.red.mul(this, e) | |
} | |
, | |
o.prototype.redIMul = function(e) { | |
return r(this.red, "redMul works only with red numbers"), | |
this.red._verify2(this, e), | |
this.red.imul(this, e) | |
} | |
, | |
o.prototype.redSqr = function() { | |
return r(this.red, "redSqr works only with red numbers"), | |
this.red._verify1(this), | |
this.red.sqr(this) | |
} | |
, | |
o.prototype.redISqr = function() { | |
return r(this.red, "redISqr works only with red numbers"), | |
this.red._verify1(this), | |
this.red.isqr(this) | |
} | |
, | |
o.prototype.redSqrt = function() { | |
return r(this.red, "redSqrt works only with red numbers"), | |
this.red._verify1(this), | |
this.red.sqrt(this) | |
} | |
, | |
o.prototype.redInvm = function() { | |
return r(this.red, "redInvm works only with red numbers"), | |
this.red._verify1(this), | |
this.red.invm(this) | |
} | |
, | |
o.prototype.redNeg = function() { | |
return r(this.red, "redNeg works only with red numbers"), | |
this.red._verify1(this), | |
this.red.neg(this) | |
} | |
, | |
o.prototype.redPow = function(e) { | |
return r(this.red && !e.red, "redPow(normalNum)"), | |
this.red._verify1(this), | |
this.red.pow(this, e) | |
} | |
; | |
var b = { | |
k256: null, | |
p224: null, | |
p192: null, | |
p25519: null | |
}; | |
function g(e, t) { | |
this.name = e, | |
this.p = new o(t,16), | |
this.n = this.p.bitLength(), | |
this.k = new o(1).iushln(this.n).isub(this.p), | |
this.tmp = this._tmp() | |
} | |
function y() { | |
g.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f") | |
} | |
function v() { | |
g.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001") | |
} | |
function _() { | |
g.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff") | |
} | |
function w() { | |
g.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed") | |
} | |
function S(e) { | |
if ("string" == typeof e) { | |
var t = o._prime(e); | |
this.m = t.p, | |
this.prime = t | |
} else | |
r(e.gtn(1), "modulus must be greater than 1"), | |
this.m = e, | |
this.prime = null | |
} | |
function E(e) { | |
S.call(this, e), | |
this.shift = this.m.bitLength(), | |
this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), | |
this.r = new o(1).iushln(this.shift), | |
this.r2 = this.imod(this.r.sqr()), | |
this.rinv = this.r._invmp(this.m), | |
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), | |
this.minv = this.minv.umod(this.r), | |
this.minv = this.r.sub(this.minv) | |
} | |
g.prototype._tmp = function() { | |
var e = new o(null); | |
return e.words = new Array(Math.ceil(this.n / 13)), | |
e | |
} | |
, | |
g.prototype.ireduce = function(e) { | |
var t, n = e; | |
do { | |
this.split(n, this.tmp), | |
t = (n = (n = this.imulK(n)).iadd(this.tmp)).bitLength() | |
} while (t > this.n);var r = t < this.n ? -1 : n.ucmp(this.p); | |
return 0 === r ? (n.words[0] = 0, | |
n.length = 1) : r > 0 ? n.isub(this.p) : void 0 !== n.strip ? n.strip() : n._strip(), | |
n | |
} | |
, | |
g.prototype.split = function(e, t) { | |
e.iushrn(this.n, 0, t) | |
} | |
, | |
g.prototype.imulK = function(e) { | |
return e.imul(this.k) | |
} | |
, | |
i(y, g), | |
y.prototype.split = function(e, t) { | |
for (var n = Math.min(e.length, 9), r = 0; r < n; r++) | |
t.words[r] = e.words[r]; | |
if (t.length = n, | |
e.length <= 9) | |
return e.words[0] = 0, | |
void (e.length = 1); | |
var i = e.words[9]; | |
for (t.words[t.length++] = 4194303 & i, | |
r = 10; r < e.length; r++) { | |
var o = 0 | e.words[r]; | |
e.words[r - 10] = (4194303 & o) << 4 | i >>> 22, | |
i = o | |
} | |
i >>>= 22, | |
e.words[r - 10] = i, | |
0 === i && e.length > 10 ? e.length -= 10 : e.length -= 9 | |
} | |
, | |
y.prototype.imulK = function(e) { | |
e.words[e.length] = 0, | |
e.words[e.length + 1] = 0, | |
e.length += 2; | |
for (var t = 0, n = 0; n < e.length; n++) { | |
var r = 0 | e.words[n]; | |
t += 977 * r, | |
e.words[n] = 67108863 & t, | |
t = 64 * r + (t / 67108864 | 0) | |
} | |
return 0 === e.words[e.length - 1] && (e.length--, | |
0 === e.words[e.length - 1] && e.length--), | |
e | |
} | |
, | |
i(v, g), | |
i(_, g), | |
i(w, g), | |
w.prototype.imulK = function(e) { | |
for (var t = 0, n = 0; n < e.length; n++) { | |
var r = 19 * (0 | e.words[n]) + t | |
, i = 67108863 & r; | |
r >>>= 26, | |
e.words[n] = i, | |
t = r | |
} | |
return 0 !== t && (e.words[e.length++] = t), | |
e | |
} | |
, | |
o._prime = function(e) { | |
if (b[e]) | |
return b[e]; | |
var t; | |
if ("k256" === e) | |
t = new y; | |
else if ("p224" === e) | |
t = new v; | |
else if ("p192" === e) | |
t = new _; | |
else { | |
if ("p25519" !== e) | |
throw new Error("Unknown prime " + e); | |
t = new w | |
} | |
return b[e] = t, | |
t | |
} | |
, | |
S.prototype._verify1 = function(e) { | |
r(0 === e.negative, "red works only with positives"), | |
r(e.red, "red works only with red numbers") | |
} | |
, | |
S.prototype._verify2 = function(e, t) { | |
r(0 == (e.negative | t.negative), "red works only with positives"), | |
r(e.red && e.red === t.red, "red works only with red numbers") | |
} | |
, | |
S.prototype.imod = function(e) { | |
return this.prime ? this.prime.ireduce(e)._forceRed(this) : e.umod(this.m)._forceRed(this) | |
} | |
, | |
S.prototype.neg = function(e) { | |
return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this) | |
} | |
, | |
S.prototype.add = function(e, t) { | |
this._verify2(e, t); | |
var n = e.add(t); | |
return n.cmp(this.m) >= 0 && n.isub(this.m), | |
n._forceRed(this) | |
} | |
, | |
S.prototype.iadd = function(e, t) { | |
this._verify2(e, t); | |
var n = e.iadd(t); | |
return n.cmp(this.m) >= 0 && n.isub(this.m), | |
n | |
} | |
, | |
S.prototype.sub = function(e, t) { | |
this._verify2(e, t); | |
var n = e.sub(t); | |
return n.cmpn(0) < 0 && n.iadd(this.m), | |
n._forceRed(this) | |
} | |
, | |
S.prototype.isub = function(e, t) { | |
this._verify2(e, t); | |
var n = e.isub(t); | |
return n.cmpn(0) < 0 && n.iadd(this.m), | |
n | |
} | |
, | |
S.prototype.shl = function(e, t) { | |
return this._verify1(e), | |
this.imod(e.ushln(t)) | |
} | |
, | |
S.prototype.imul = function(e, t) { | |
return this._verify2(e, t), | |
this.imod(e.imul(t)) | |
} | |
, | |
S.prototype.mul = function(e, t) { | |
return this._verify2(e, t), | |
this.imod(e.mul(t)) | |
} | |
, | |
S.prototype.isqr = function(e) { | |
return this.imul(e, e.clone()) | |
} | |
, | |
S.prototype.sqr = function(e) { | |
return this.mul(e, e) | |
} | |
, | |
S.prototype.sqrt = function(e) { | |
if (e.isZero()) | |
return e.clone(); | |
var t = this.m.andln(3); | |
if (r(t % 2 == 1), | |
3 === t) { | |
var n = this.m.add(new o(1)).iushrn(2); | |
return this.pow(e, n) | |
} | |
for (var i = this.m.subn(1), s = 0; !i.isZero() && 0 === i.andln(1); ) | |
s++, | |
i.iushrn(1); | |
r(!i.isZero()); | |
var a = new o(1).toRed(this) | |
, u = a.redNeg() | |
, l = this.m.subn(1).iushrn(1) | |
, c = this.m.bitLength(); | |
for (c = new o(2 * c * c).toRed(this); 0 !== this.pow(c, l).cmp(u); ) | |
c.redIAdd(u); | |
for (var d = this.pow(c, i), f = this.pow(e, i.addn(1).iushrn(1)), h = this.pow(e, i), p = s; 0 !== h.cmp(a); ) { | |
for (var m = h, b = 0; 0 !== m.cmp(a); b++) | |
m = m.redSqr(); | |
r(b < p); | |
var g = this.pow(d, new o(1).iushln(p - b - 1)); | |
f = f.redMul(g), | |
d = g.redSqr(), | |
h = h.redMul(d), | |
p = b | |
} | |
return f | |
} | |
, | |
S.prototype.invm = function(e) { | |
var t = e._invmp(this.m); | |
return 0 !== t.negative ? (t.negative = 0, | |
this.imod(t).redNeg()) : this.imod(t) | |
} | |
, | |
S.prototype.pow = function(e, t) { | |
if (t.isZero()) | |
return new o(1).toRed(this); | |
if (0 === t.cmpn(1)) | |
return e.clone(); | |
var n = new Array(16); | |
n[0] = new o(1).toRed(this), | |
n[1] = e; | |
for (var r = 2; r < n.length; r++) | |
n[r] = this.mul(n[r - 1], e); | |
var i = n[0] | |
, s = 0 | |
, a = 0 | |
, u = t.bitLength() % 26; | |
for (0 === u && (u = 26), | |
r = t.length - 1; r >= 0; r--) { | |
for (var l = t.words[r], c = u - 1; c >= 0; c--) { | |
var d = l >> c & 1; | |
i !== n[0] && (i = this.sqr(i)), | |
0 !== d || 0 !== s ? (s <<= 1, | |
s |= d, | |
(4 === ++a || 0 === r && 0 === c) && (i = this.mul(i, n[s]), | |
a = 0, | |
s = 0)) : a = 0 | |
} | |
u = 26 | |
} | |
return i | |
} | |
, | |
S.prototype.convertTo = function(e) { | |
var t = e.umod(this.m); | |
return t === e ? t.clone() : t | |
} | |
, | |
S.prototype.convertFrom = function(e) { | |
var t = e.clone(); | |
return t.red = null, | |
t | |
} | |
, | |
o.mont = function(e) { | |
return new E(e) | |
} | |
, | |
i(E, S), | |
E.prototype.convertTo = function(e) { | |
return this.imod(e.ushln(this.shift)) | |
} | |
, | |
E.prototype.convertFrom = function(e) { | |
var t = this.imod(e.mul(this.rinv)); | |
return t.red = null, | |
t | |
} | |
, | |
E.prototype.imul = function(e, t) { | |
if (e.isZero() || t.isZero()) | |
return e.words[0] = 0, | |
e.length = 1, | |
e; | |
var n = e.imul(t) | |
, r = n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m) | |
, i = n.isub(r).iushrn(this.shift) | |
, o = i; | |
return i.cmp(this.m) >= 0 ? o = i.isub(this.m) : i.cmpn(0) < 0 && (o = i.iadd(this.m)), | |
o._forceRed(this) | |
} | |
, | |
E.prototype.mul = function(e, t) { | |
if (e.isZero() || t.isZero()) | |
return new o(0)._forceRed(this); | |
var n = e.mul(t) | |
, r = n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m) | |
, i = n.isub(r).iushrn(this.shift) | |
, s = i; | |
return i.cmp(this.m) >= 0 ? s = i.isub(this.m) : i.cmpn(0) < 0 && (s = i.iadd(this.m)), | |
s._forceRed(this) | |
} | |
, | |
E.prototype.invm = function(e) { | |
return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this) | |
} | |
}(e, this) | |
} | |
).call(this, n("./node_modules/webpack/buildin/module.js")(e)) | |
}, | |
"./node_modules/brorand/index.js": function(e, t, n) { | |
var r; | |
function i(e) { | |
this.rand = e | |
} | |
if (e.exports = function(e) { | |
return r || (r = new i(null)), | |
r.generate(e) | |
} | |
, | |
e.exports.Rand = i, | |
i.prototype.generate = function(e) { | |
return this._rand(e) | |
} | |
, | |
i.prototype._rand = function(e) { | |
if (this.rand.getBytes) | |
return this.rand.getBytes(e); | |
for (var t = new Uint8Array(e), n = 0; n < t.length; n++) | |
t[n] = this.rand.getByte(); | |
return t | |
} | |
, | |
"object" == typeof self) | |
self.crypto && self.crypto.getRandomValues ? i.prototype._rand = function(e) { | |
var t = new Uint8Array(e); | |
return self.crypto.getRandomValues(t), | |
t | |
} | |
: self.msCrypto && self.msCrypto.getRandomValues ? i.prototype._rand = function(e) { | |
var t = new Uint8Array(e); | |
return self.msCrypto.getRandomValues(t), | |
t | |
} | |
: "object" == typeof window && (i.prototype._rand = function() { | |
throw new Error("Not implemented yet") | |
} | |
); | |
else | |
try { | |
var o = n(6); | |
if ("function" != typeof o.randomBytes) | |
throw new Error("Not supported"); | |
i.prototype._rand = function(e) { | |
return o.randomBytes(e) | |
} | |
} catch (e) {} | |
}, | |
"./node_modules/browserify-aes/aes.js": function(e, t, n) { | |
var r = n("./node_modules/safe-buffer/index.js").Buffer; | |
function i(e) { | |
r.isBuffer(e) || (e = r.from(e)); | |
for (var t = e.length / 4 | 0, n = new Array(t), i = 0; i < t; i++) | |
n[i] = e.readUInt32BE(4 * i); | |
return n | |
} | |
function o(e) { | |
for (; 0 < e.length; e++) | |
e[0] = 0 | |
} | |
function s(e, t, n, r, i) { | |
for (var o, s, a, u, l = n[0], c = n[1], d = n[2], f = n[3], h = e[0] ^ t[0], p = e[1] ^ t[1], m = e[2] ^ t[2], b = e[3] ^ t[3], g = 4, y = 1; y < i; y++) | |
o = l[h >>> 24] ^ c[p >>> 16 & 255] ^ d[m >>> 8 & 255] ^ f[255 & b] ^ t[g++], | |
s = l[p >>> 24] ^ c[m >>> 16 & 255] ^ d[b >>> 8 & 255] ^ f[255 & h] ^ t[g++], | |
a = l[m >>> 24] ^ c[b >>> 16 & 255] ^ d[h >>> 8 & 255] ^ f[255 & p] ^ t[g++], | |
u = l[b >>> 24] ^ c[h >>> 16 & 255] ^ d[p >>> 8 & 255] ^ f[255 & m] ^ t[g++], | |
h = o, | |
p = s, | |
m = a, | |
b = u; | |
return o = (r[h >>> 24] << 24 | r[p >>> 16 & 255] << 16 | r[m >>> 8 & 255] << 8 | r[255 & b]) ^ t[g++], | |
s = (r[p >>> 24] << 24 | r[m >>> 16 & 255] << 16 | r[b >>> 8 & 255] << 8 | r[255 & h]) ^ t[g++], | |
a = (r[m >>> 24] << 24 | r[b >>> 16 & 255] << 16 | r[h >>> 8 & 255] << 8 | r[255 & p]) ^ t[g++], | |
u = (r[b >>> 24] << 24 | r[h >>> 16 & 255] << 16 | r[p >>> 8 & 255] << 8 | r[255 & m]) ^ t[g++], | |
[o >>>= 0, s >>>= 0, a >>>= 0, u >>>= 0] | |
} | |
var a = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54] | |
, u = function() { | |
for (var e = new Array(256), t = 0; t < 256; t++) | |
e[t] = t < 128 ? t << 1 : t << 1 ^ 283; | |
for (var n = [], r = [], i = [[], [], [], []], o = [[], [], [], []], s = 0, a = 0, u = 0; u < 256; ++u) { | |
var l = a ^ a << 1 ^ a << 2 ^ a << 3 ^ a << 4; | |
l = l >>> 8 ^ 255 & l ^ 99, | |
n[s] = l, | |
r[l] = s; | |
var c = e[s] | |
, d = e[c] | |
, f = e[d] | |
, h = 257 * e[l] ^ 16843008 * l; | |
i[0][s] = h << 24 | h >>> 8, | |
i[1][s] = h << 16 | h >>> 16, | |
i[2][s] = h << 8 | h >>> 24, | |
i[3][s] = h, | |
h = 16843009 * f ^ 65537 * d ^ 257 * c ^ 16843008 * s, | |
o[0][l] = h << 24 | h >>> 8, | |
o[1][l] = h << 16 | h >>> 16, | |
o[2][l] = h << 8 | h >>> 24, | |
o[3][l] = h, | |
0 === s ? s = a = 1 : (s = c ^ e[e[e[f ^ c]]], | |
a ^= e[e[a]]) | |
} | |
return { | |
SBOX: n, | |
INV_SBOX: r, | |
SUB_MIX: i, | |
INV_SUB_MIX: o | |
} | |
}(); | |
function l(e) { | |
this._key = i(e), | |
this._reset() | |
} | |
l.blockSize = 16, | |
l.keySize = 32, | |
l.prototype.blockSize = l.blockSize, | |
l.prototype.keySize = l.keySize, | |
l.prototype._reset = function() { | |
for (var e = this._key, t = e.length, n = t + 6, r = 4 * (n + 1), i = [], o = 0; o < t; o++) | |
i[o] = e[o]; | |
for (o = t; o < r; o++) { | |
var s = i[o - 1]; | |
o % t == 0 ? (s = s << 8 | s >>> 24, | |
s = u.SBOX[s >>> 24] << 24 | u.SBOX[s >>> 16 & 255] << 16 | u.SBOX[s >>> 8 & 255] << 8 | u.SBOX[255 & s], | |
s ^= a[o / t | 0] << 24) : t > 6 && o % t == 4 && (s = u.SBOX[s >>> 24] << 24 | u.SBOX[s >>> 16 & 255] << 16 | u.SBOX[s >>> 8 & 255] << 8 | u.SBOX[255 & s]), | |
i[o] = i[o - t] ^ s | |
} | |
for (var l = [], c = 0; c < r; c++) { | |
var d = r - c | |
, f = i[d - (c % 4 ? 0 : 4)]; | |
l[c] = c < 4 || d <= 4 ? f : u.INV_SUB_MIX[0][u.SBOX[f >>> 24]] ^ u.INV_SUB_MIX[1][u.SBOX[f >>> 16 & 255]] ^ u.INV_SUB_MIX[2][u.SBOX[f >>> 8 & 255]] ^ u.INV_SUB_MIX[3][u.SBOX[255 & f]] | |
} | |
this._nRounds = n, | |
this._keySchedule = i, | |
this._invKeySchedule = l | |
} | |
, | |
l.prototype.encryptBlockRaw = function(e) { | |
return s(e = i(e), this._keySchedule, u.SUB_MIX, u.SBOX, this._nRounds) | |
} | |
, | |
l.prototype.encryptBlock = function(e) { | |
var t = this.encryptBlockRaw(e) | |
, n = r.allocUnsafe(16); | |
return n.writeUInt32BE(t[0], 0), | |
n.writeUInt32BE(t[1], 4), | |
n.writeUInt32BE(t[2], 8), | |
n.writeUInt32BE(t[3], 12), | |
n | |
} | |
, | |
l.prototype.decryptBlock = function(e) { | |
var t = (e = i(e))[1]; | |
e[1] = e[3], | |
e[3] = t; | |
var n = s(e, this._invKeySchedule, u.INV_SUB_MIX, u.INV_SBOX, this._nRounds) | |
, o = r.allocUnsafe(16); | |
return o.writeUInt32BE(n[0], 0), | |
o.writeUInt32BE(n[3], 4), | |
o.writeUInt32BE(n[2], 8), | |
o.writeUInt32BE(n[1], 12), | |
o | |
} | |
, | |
l.prototype.scrub = function() { | |
o(this._keySchedule), | |
o(this._invKeySchedule), | |
o(this._key) | |
} | |
, | |
e.exports.AES = l | |
}, | |
"./node_modules/browserify-aes/authCipher.js": function(e, t, n) { | |
var r = n("./node_modules/browserify-aes/aes.js") | |
, i = n("./node_modules/safe-buffer/index.js").Buffer | |
, o = n("./node_modules/cipher-base/index.js") | |
, s = n("./node_modules/inherits/inherits_browser.js") | |
, a = n("./node_modules/browserify-aes/ghash.js") | |
, u = n("./node_modules/buffer-xor/index.js") | |
, l = n("./node_modules/browserify-aes/incr32.js"); | |
function c(e, t, n, s) { | |
o.call(this); | |
var u = i.alloc(4, 0); | |
this._cipher = new r.AES(t); | |
var c = this._cipher.encryptBlock(u); | |
this._ghash = new a(c), | |
n = function(e, t, n) { | |
if (12 === t.length) | |
return e._finID = i.concat([t, i.from([0, 0, 0, 1])]), | |
i.concat([t, i.from([0, 0, 0, 2])]); | |
var r = new a(n) | |
, o = t.length | |
, s = o % 16; | |
r.update(t), | |
s && (s = 16 - s, | |
r.update(i.alloc(s, 0))), | |
r.update(i.alloc(8, 0)); | |
var u = 8 * o | |
, c = i.alloc(8); | |
c.writeUIntBE(u, 0, 8), | |
r.update(c), | |
e._finID = r.state; | |
var d = i.from(e._finID); | |
return l(d), | |
d | |
}(this, n, c), | |
this._prev = i.from(n), | |
this._cache = i.allocUnsafe(0), | |
this._secCache = i.allocUnsafe(0), | |
this._decrypt = s, | |
this._alen = 0, | |
this._len = 0, | |
this._mode = e, | |
this._authTag = null, | |
this._called = !1 | |
} | |
s(c, o), | |
c.prototype._update = function(e) { | |
if (!this._called && this._alen) { | |
var t = 16 - this._alen % 16; | |
t < 16 && (t = i.alloc(t, 0), | |
this._ghash.update(t)) | |
} | |
this._called = !0; | |
var n = this._mode.encrypt(this, e); | |
return this._decrypt ? this._ghash.update(e) : this._ghash.update(n), | |
this._len += e.length, | |
n | |
} | |
, | |
c.prototype._final = function() { | |
if (this._decrypt && !this._authTag) | |
throw new Error("Unsupported state or unable to authenticate data"); | |
var e = u(this._ghash.final(8 * this._alen, 8 * this._len), this._cipher.encryptBlock(this._finID)); | |
if (this._decrypt && function(e, t) { | |
var n = 0; | |
e.length !== t.length && n++; | |
for (var r = Math.min(e.length, t.length), i = 0; i < r; ++i) | |
n += e[i] ^ t[i]; | |
return n | |
}(e, this._authTag)) | |
throw new Error("Unsupported state or unable to authenticate data"); | |
this._authTag = e, | |
this._cipher.scrub() | |
} | |
, | |
c.prototype.getAuthTag = function() { | |
if (this._decrypt || !i.isBuffer(this._authTag)) | |
throw new Error("Attempting to get auth tag in unsupported state"); | |
return this._authTag | |
} | |
, | |
c.prototype.setAuthTag = function(e) { | |
if (!this._decrypt) | |
throw new Error("Attempting to set auth tag in unsupported state"); | |
this._authTag = e | |
} | |
, | |
c.prototype.setAAD = function(e) { | |
if (this._called) | |
throw new Error("Attempting to set AAD in unsupported state"); | |
this._ghash.update(e), | |
this._alen += e.length | |
} | |
, | |
e.exports = c | |
}, | |
"./node_modules/browserify-aes/browser.js": function(e, t, n) { | |
var r = n("./node_modules/browserify-aes/encrypter.js") | |
, i = n("./node_modules/browserify-aes/decrypter.js") | |
, o = n("./node_modules/browserify-aes/modes/list.json"); | |
t.createCipher = t.Cipher = r.createCipher, | |
t.createCipheriv = t.Cipheriv = r.createCipheriv, | |
t.createDecipher = t.Decipher = i.createDecipher, | |
t.createDecipheriv = t.Decipheriv = i.createDecipheriv, | |
t.listCiphers = t.getCiphers = function() { | |
return Object.keys(o) | |
} | |
}, | |
"./node_modules/browserify-aes/decrypter.js": function(e, t, n) { | |
var r = n("./node_modules/browserify-aes/authCipher.js") | |
, i = n("./node_modules/safe-buffer/index.js").Buffer | |
, o = n("./node_modules/browserify-aes/modes/index.js") | |
, s = n("./node_modules/browserify-aes/streamCipher.js") | |
, a = n("./node_modules/cipher-base/index.js") | |
, u = n("./node_modules/browserify-aes/aes.js") | |
, l = n("./node_modules/evp_bytestokey/index.js"); | |
function c(e, t, n) { | |
a.call(this), | |
this._cache = new d, | |
this._last = void 0, | |
this._cipher = new u.AES(t), | |
this._prev = i.from(n), | |
this._mode = e, | |
this._autopadding = !0 | |
} | |
function d() { | |
this.cache = i.allocUnsafe(0) | |
} | |
function f(e, t, n) { | |
var a = o[e.toLowerCase()]; | |
if (!a) | |
throw new TypeError("invalid suite type"); | |
if ("string" == typeof n && (n = i.from(n)), | |
"GCM" !== a.mode && n.length !== a.iv) | |
throw new TypeError("invalid iv length " + n.length); | |
if ("string" == typeof t && (t = i.from(t)), | |
t.length !== a.key / 8) | |
throw new TypeError("invalid key length " + t.length); | |
return "stream" === a.type ? new s(a.module,t,n,!0) : "auth" === a.type ? new r(a.module,t,n,!0) : new c(a.module,t,n) | |
} | |
n("./node_modules/inherits/inherits_browser.js")(c, a), | |
c.prototype._update = function(e) { | |
var t, n; | |
this._cache.add(e); | |
for (var r = []; t = this._cache.get(this._autopadding); ) | |
n = this._mode.decrypt(this, t), | |
r.push(n); | |
return i.concat(r) | |
} | |
, | |
c.prototype._final = function() { | |
var e = this._cache.flush(); | |
if (this._autopadding) | |
return function(e) { | |
var t = e[15]; | |
if (t < 1 || t > 16) | |
throw new Error("unable to decrypt data"); | |
var n = -1; | |
for (; ++n < t; ) | |
if (e[n + (16 - t)] !== t) | |
throw new Error("unable to decrypt data"); | |
if (16 === t) | |
return; | |
return e.slice(0, 16 - t) | |
}(this._mode.decrypt(this, e)); | |
if (e) | |
throw new Error("data not multiple of block length") | |
} | |
, | |
c.prototype.setAutoPadding = function(e) { | |
return this._autopadding = !!e, | |
this | |
} | |
, | |
d.prototype.add = function(e) { | |
this.cache = i.concat([this.cache, e]) | |
} | |
, | |
d.prototype.get = function(e) { | |
var t; | |
if (e) { | |
if (this.cache.length > 16) | |
return t = this.cache.slice(0, 16), | |
this.cache = this.cache.slice(16), | |
t | |
} else if (this.cache.length >= 16) | |
return t = this.cache.slice(0, 16), | |
this.cache = this.cache.slice(16), | |
t; | |
return null | |
} | |
, | |
d.prototype.flush = function() { | |
if (this.cache.length) | |
return this.cache | |
} | |
, | |
t.createDecipher = function(e, t) { | |
var n = o[e.toLowerCase()]; | |
if (!n) | |
throw new TypeError("invalid suite type"); | |
var r = l(t, !1, n.key, n.iv); | |
return f(e, r.key, r.iv) | |
} | |
, | |
t.createDecipheriv = f | |
}, | |
"./node_modules/browserify-aes/encrypter.js": function(e, t, n) { | |
var r = n("./node_modules/browserify-aes/modes/index.js") | |
, i = n("./node_modules/browserify-aes/authCipher.js") | |
, o = n("./node_modules/safe-buffer/index.js").Buffer | |
, s = n("./node_modules/browserify-aes/streamCipher.js") | |
, a = n("./node_modules/cipher-base/index.js") | |
, u = n("./node_modules/browserify-aes/aes.js") | |
, l = n("./node_modules/evp_bytestokey/index.js"); | |
function c(e, t, n) { | |
a.call(this), | |
this._cache = new f, | |
this._cipher = new u.AES(t), | |
this._prev = o.from(n), | |
this._mode = e, | |
this._autopadding = !0 | |
} | |
n("./node_modules/inherits/inherits_browser.js")(c, a), | |
c.prototype._update = function(e) { | |
var t, n; | |
this._cache.add(e); | |
for (var r = []; t = this._cache.get(); ) | |
n = this._mode.encrypt(this, t), | |
r.push(n); | |
return o.concat(r) | |
} | |
; | |
var d = o.alloc(16, 16); | |
function f() { | |
this.cache = o.allocUnsafe(0) | |
} | |
function h(e, t, n) { | |
var a = r[e.toLowerCase()]; | |
if (!a) | |
throw new TypeError("invalid suite type"); | |
if ("string" == typeof t && (t = o.from(t)), | |
t.length !== a.key / 8) | |
throw new TypeError("invalid key length " + t.length); | |
if ("string" == typeof n && (n = o.from(n)), | |
"GCM" !== a.mode && n.length !== a.iv) | |
throw new TypeError("invalid iv length " + n.length); | |
return "stream" === a.type ? new s(a.module,t,n) : "auth" === a.type ? new i(a.module,t,n) : new c(a.module,t,n) | |
} | |
c.prototype._final = function() { | |
var e = this._cache.flush(); | |
if (this._autopadding) | |
return e = this._mode.encrypt(this, e), | |
this._cipher.scrub(), | |
e; | |
if (!e.equals(d)) | |
throw this._cipher.scrub(), | |
new Error("data not multiple of block length") | |
} | |
, | |
c.prototype.setAutoPadding = function(e) { | |
return this._autopadding = !!e, | |
this | |
} | |
, | |
f.prototype.add = function(e) { | |
this.cache = o.concat([this.cache, e]) | |
} | |
, | |
f.prototype.get = function() { | |
if (this.cache.length > 15) { | |
var e = this.cache.slice(0, 16); | |
return this.cache = this.cache.slice(16), | |
e | |
} | |
return null | |
} | |
, | |
f.prototype.flush = function() { | |
for (var e = 16 - this.cache.length, t = o.allocUnsafe(e), n = -1; ++n < e; ) | |
t.writeUInt8(e, n); | |
return o.concat([this.cache, t]) | |
} | |
, | |
t.createCipheriv = h, | |
t.createCipher = function(e, t) { | |
var n = r[e.toLowerCase()]; | |
if (!n) | |
throw new TypeError("invalid suite type"); | |
var i = l(t, !1, n.key, n.iv); | |
return h(e, i.key, i.iv) | |
} | |
}, | |
"./node_modules/browserify-aes/ghash.js": function(e, t, n) { | |
var r = n("./node_modules/safe-buffer/index.js").Buffer | |
, i = r.alloc(16, 0); | |
function o(e) { | |
var t = r.allocUnsafe(16); | |
return t.writeUInt32BE(e[0] >>> 0, 0), | |
t.writeUInt32BE(e[1] >>> 0, 4), | |
t.writeUInt32BE(e[2] >>> 0, 8), | |
t.writeUInt32BE(e[3] >>> 0, 12), | |
t | |
} | |
function s(e) { | |
this.h = e, | |
this.state = r.alloc(16, 0), | |
this.cache = r.allocUnsafe(0) | |
} | |
s.prototype.ghash = function(e) { | |
for (var t = -1; ++t < e.length; ) | |
this.state[t] ^= e[t]; | |
this._multiply() | |
} | |
, | |
s.prototype._multiply = function() { | |
for (var e, t, n, r = [(e = this.h).readUInt32BE(0), e.readUInt32BE(4), e.readUInt32BE(8), e.readUInt32BE(12)], i = [0, 0, 0, 0], s = -1; ++s < 128; ) { | |
for (0 != (this.state[~~(s / 8)] & 1 << 7 - s % 8) && (i[0] ^= r[0], | |
i[1] ^= r[1], | |
i[2] ^= r[2], | |
i[3] ^= r[3]), | |
n = 0 != (1 & r[3]), | |
t = 3; t > 0; t--) | |
r[t] = r[t] >>> 1 | (1 & r[t - 1]) << 31; | |
r[0] = r[0] >>> 1, | |
n && (r[0] = r[0] ^ 225 << 24) | |
} | |
this.state = o(i) | |
} | |
, | |
s.prototype.update = function(e) { | |
var t; | |
for (this.cache = r.concat([this.cache, e]); this.cache.length >= 16; ) | |
t = this.cache.slice(0, 16), | |
this.cache = this.cache.slice(16), | |
this.ghash(t) | |
} | |
, | |
s.prototype.final = function(e, t) { | |
return this.cache.length && this.ghash(r.concat([this.cache, i], 16)), | |
this.ghash(o([0, e, 0, t])), | |
this.state | |
} | |
, | |
e.exports = s | |
}, | |
"./node_modules/browserify-aes/incr32.js": function(e, t) { | |
e.exports = function(e) { | |
for (var t, n = e.length; n--; ) { | |
if (255 !== (t = e.readUInt8(n))) { | |
t++, | |
e.writeUInt8(t, n); | |
break | |
} | |
e.writeUInt8(0, n) | |
} | |
} | |
}, | |
"./node_modules/browserify-aes/modes/cbc.js": function(e, t, n) { | |
var r = n("./node_modules/buffer-xor/index.js"); | |
t.encrypt = function(e, t) { | |
var n = r(t, e._prev); | |
return e._prev = e._cipher.encryptBlock(n), | |
e._prev | |
} | |
, | |
t.decrypt = function(e, t) { | |
var n = e._prev; | |
e._prev = t; | |
var i = e._cipher.decryptBlock(t); | |
return r(i, n) | |
} | |
}, | |
"./node_modules/browserify-aes/modes/cfb.js": function(e, t, n) { | |
var r = n("./node_modules/safe-buffer/index.js").Buffer | |
, i = n("./node_modules/buffer-xor/index.js"); | |
function o(e, t, n) { | |
var o = t.length | |
, s = i(t, e._cache); | |
return e._cache = e._cache.slice(o), | |
e._prev = r.concat([e._prev, n ? t : s]), | |
s | |
} | |
t.encrypt = function(e, t, n) { | |
for (var i, s = r.allocUnsafe(0); t.length; ) { | |
if (0 === e._cache.length && (e._cache = e._cipher.encryptBlock(e._prev), | |
e._prev = r.allocUnsafe(0)), | |
!(e._cache.length <= t.length)) { | |
s = r.concat([s, o(e, t, n)]); | |
break | |
} | |
i = e._cache.length, | |
s = r.concat([s, o(e, t.slice(0, i), n)]), | |
t = t.slice(i) | |
} | |
return s | |
} | |
}, | |
"./node_modules/browserify-aes/modes/cfb1.js": function(e, t, n) { | |
var r = n("./node_modules/safe-buffer/index.js").Buffer; | |
function i(e, t, n) { | |
for (var r, i, s = -1, a = 0; ++s < 8; ) | |
r = t & 1 << 7 - s ? 128 : 0, | |
a += (128 & (i = e._cipher.encryptBlock(e._prev)[0] ^ r)) >> s % 8, | |
e._prev = o(e._prev, n ? r : i); | |
return a | |
} | |
function o(e, t) { | |
var n = e.length | |
, i = -1 | |
, o = r.allocUnsafe(e.length); | |
for (e = r.concat([e, r.from([t])]); ++i < n; ) | |
o[i] = e[i] << 1 | e[i + 1] >> 7; | |
return o | |
} | |
t.encrypt = function(e, t, n) { | |
for (var o = t.length, s = r.allocUnsafe(o), a = -1; ++a < o; ) | |
s[a] = i(e, t[a], n); | |
return s | |
} | |
}, | |
"./node_modules/browserify-aes/modes/cfb8.js": function(e, t, n) { | |
var r = n("./node_modules/safe-buffer/index.js").Buffer; | |
function i(e, t, n) { | |
var i = e._cipher.encryptBlock(e._prev)[0] ^ t; | |
return e._prev = r.concat([e._prev.slice(1), r.from([n ? t : i])]), | |
i | |
} | |
t.encrypt = function(e, t, n) { | |
for (var o = t.length, s = r.allocUnsafe(o), a = -1; ++a < o; ) | |
s[a] = i(e, t[a], n); | |
return s | |
} | |
}, | |
"./node_modules/browserify-aes/modes/ctr.js": function(e, t, n) { | |
var r = n("./node_modules/buffer-xor/index.js") | |
, i = n("./node_modules/safe-buffer/index.js").Buffer | |
, o = n("./node_modules/browserify-aes/incr32.js"); | |
function s(e) { | |
var t = e._cipher.encryptBlockRaw(e._prev); | |
return o(e._prev), | |
t | |
} | |
t.encrypt = function(e, t) { | |
var n = Math.ceil(t.length / 16) | |
, o = e._cache.length; | |
e._cache = i.concat([e._cache, i.allocUnsafe(16 * n)]); | |
for (var a = 0; a < n; a++) { | |
var u = s(e) | |
, l = o + 16 * a; | |
e._cache.writeUInt32BE(u[0], l + 0), | |
e._cache.writeUInt32BE(u[1], l + 4), | |
e._cache.writeUInt32BE(u[2], l + 8), | |
e._cache.writeUInt32BE(u[3], l + 12) | |
} | |
var c = e._cache.slice(0, t.length); | |
return e._cache = e._cache.slice(t.length), | |
r(t, c) | |
} | |
}, | |
"./node_modules/browserify-aes/modes/ecb.js": function(e, t) { | |
t.encrypt = function(e, t) { | |
return e._cipher.encryptBlock(t) | |
} | |
, | |
t.decrypt = function(e, t) { | |
return e._cipher.decryptBlock(t) | |
} | |
}, | |
"./node_modules/browserify-aes/modes/index.js": function(e, t, n) { | |
var r = { | |
ECB: n("./node_modules/browserify-aes/modes/ecb.js"), | |
CBC: n("./node_modules/browserify-aes/modes/cbc.js"), | |
CFB: n("./node_modules/browserify-aes/modes/cfb.js"), | |
CFB8: n("./node_modules/browserify-aes/modes/cfb8.js"), | |
CFB1: n("./node_modules/browserify-aes/modes/cfb1.js"), | |
OFB: n("./node_modules/browserify-aes/modes/ofb.js"), | |
CTR: n("./node_modules/browserify-aes/modes/ctr.js"), | |
GCM: n("./node_modules/browserify-aes/modes/ctr.js") | |
} | |
, i = n("./node_modules/browserify-aes/modes/list.json"); | |
for (var o in i) | |
i[o].module = r[i[o].mode]; | |
e.exports = i | |
}, | |
"./node_modules/browserify-aes/modes/list.json": function(e, t, n) { | |
"use strict"; | |
n.r(t), | |
t.default = n.p + "node_modules/browserify-aes/modes/list.json" | |
}, | |
"./node_modules/browserify-aes/modes/ofb.js": function(e, t, n) { | |
(function(e) { | |
var r = n("./node_modules/buffer-xor/index.js"); | |
function i(e) { | |
return e._prev = e._cipher.encryptBlock(e._prev), | |
e._prev | |
} | |
t.encrypt = function(t, n) { | |
for (; t._cache.length < n.length; ) | |
t._cache = e.concat([t._cache, i(t)]); | |
var o = t._cache.slice(0, n.length); | |
return t._cache = t._cache.slice(n.length), | |
r(n, o) | |
} | |
} | |
).call(this, n("./node_modules/buffer/index.js").Buffer) | |
}, | |
"./node_modules/browserify-aes/streamCipher.js": function(e, t, n) { | |
var r = n("./node_modules/browserify-aes/aes.js") | |
, i = n("./node_modules/safe-buffer/index.js").Buffer | |
, o = n("./node_modules/cipher-base/index.js"); | |
function s(e, t, n, s) { | |
o.call(this), | |
this._cipher = new r.AES(t), | |
this._prev = i.from(n), | |
this._cache = i.allocUnsafe(0), | |
this._secCache = i.allocUnsafe(0), | |
this._decrypt = s, | |
this._mode = e | |
} | |
n("./node_modules/inherits/inherits_browser.js")(s, o), | |
s.prototype._update = function(e) { | |
return this._mode.encrypt(this, e, this._decrypt) | |
} | |
, | |
s.prototype._final = function() { | |
this._cipher.scrub() | |
} | |
, | |
e.exports = s | |
}, | |
"./node_modules/browserify-cipher/browser.js": function(e, t, n) { | |
var r = n("./node_modules/browserify-des/index.js") | |
, i = n("./node_modules/browserify-aes/browser.js") | |
, o = n("./node_modules/browserify-aes/modes/index.js") | |
, s = n("./node_modules/browserify-des/modes.js") | |
, a = n("./node_modules/evp_bytestokey/index.js"); | |
function u(e, t, n) { | |
if (e = e.toLowerCase(), | |
o[e]) | |
return i.createCipheriv(e, t, n); | |
if (s[e]) | |
return new r({ | |
key: t, | |
iv: n, | |
mode: e | |
}); | |
throw new TypeError("invalid suite type") | |
} | |
function l(e, t, n) { | |
if (e = e.toLowerCase(), | |
o[e]) | |
return i.createDecipheriv(e, t, n); | |
if (s[e]) | |
return new r({ | |
key: t, | |
iv: n, | |
mode: e, | |
decrypt: !0 | |
}); | |
throw new TypeError("invalid suite type") | |
} | |
t.createCipher = t.Cipher = function(e, t) { | |
var n, r; | |
if (e = e.toLowerCase(), | |
o[e]) | |
n = o[e].key, | |
r = o[e].iv; | |
else { | |
if (!s[e]) | |
throw new TypeError("invalid suite type"); | |
n = 8 * s[e].key, | |
r = s[e].iv | |
} | |
var i = a(t, !1, n, r); | |
return u(e, i.key, i.iv) | |
} | |
, | |
t.createCipheriv = t.Cipheriv = u, | |
t.createDecipher = t.Decipher = function(e, t) { | |
var n, r; | |
if (e = e.toLowerCase(), | |
o[e]) | |
n = o[e].key, | |
r = o[e].iv; | |
else { | |
if (!s[e]) | |
throw new TypeError("invalid suite type"); | |
n = 8 * s[e].key, | |
r = s[e].iv | |
} | |
var i = a(t, !1, n, r); | |
return l(e, i.key, i.iv) | |
} | |
, | |
t.createDecipheriv = t.Decipheriv = l, | |
t.listCiphers = t.getCiphers = function() { | |
return Object.keys(s).concat(i.getCiphers()) | |
} | |
}, | |
"./node_modules/browserify-des/index.js": function(e, t, n) { | |
var r = n("./node_modules/cipher-base/index.js") | |
, i = n("./node_modules/des.js/lib/des.js") | |
, o = n("./node_modules/inherits/inherits_browser.js") | |
, s = n("./node_modules/safe-buffer/index.js").Buffer | |
, a = { | |
"des-ede3-cbc": i.CBC.instantiate(i.EDE), | |
"des-ede3": i.EDE, | |
"des-ede-cbc": i.CBC.instantiate(i.EDE), | |
"des-ede": i.EDE, | |
"des-cbc": i.CBC.instantiate(i.DES), | |
"des-ecb": i.DES | |
}; | |
function u(e) { | |
r.call(this); | |
var t, n = e.mode.toLowerCase(), i = a[n]; | |
t = e.decrypt ? "decrypt" : "encrypt"; | |
var o = e.key; | |
s.isBuffer(o) || (o = s.from(o)), | |
"des-ede" !== n && "des-ede-cbc" !== n || (o = s.concat([o, o.slice(0, 8)])); | |
var u = e.iv; | |
s.isBuffer(u) || (u = s.from(u)), | |
this._des = i.create({ | |
key: o, | |
iv: u, | |
type: t | |
}) | |
} | |
a.des = a["des-cbc"], | |
a.des3 = a["des-ede3-cbc"], | |
e.exports = u, | |
o(u, r), | |
u.prototype._update = function(e) { | |
return s.from(this._des.update(e)) | |
} | |
, | |
u.prototype._final = function() { | |
return s.from(this._des.final()) | |
} | |
}, | |
"./node_modules/browserify-des/modes.js": function(e, t) { | |
t["des-ecb"] = { | |
key: 8, | |
iv: 0 | |
}, | |
t["des-cbc"] = t.des = { | |
key: 8, | |
iv: 8 | |
}, | |
t["des-ede3-cbc"] = t.des3 = { | |
key: 24, | |
iv: 8 | |
}, | |
t["des-ede3"] = { | |
key: 24, | |
iv: 0 | |
}, | |
t["des-ede-cbc"] = { | |
key: 16, | |
iv: 8 | |
}, | |
t["des-ede"] = { | |
key: 16, | |
iv: 0 | |
} | |
}, | |
"./node_modules/browserify-rsa/index.js": function(e, t, n) { | |
(function(t) { | |
var r = n("./node_modules/browserify-rsa/node_modules/bn.js/lib/bn.js") | |
, i = n("./node_modules/randombytes/browser.js"); | |
function o(e) { | |
var t, n = e.modulus.byteLength(); | |
do { | |
t = new r(i(n)) | |
} while (t.cmp(e.modulus) >= 0 || !t.umod(e.prime1) || !t.umod(e.prime2));return t | |
} | |
function s(e, n) { | |
var i = function(e) { | |
var t = o(e); | |
return { | |
blinder: t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(), | |
unblinder: t.invm(e.modulus) | |
} | |
}(n) | |
, s = n.modulus.byteLength() | |
, a = new r(e).mul(i.blinder).umod(n.modulus) | |
, u = a.toRed(r.mont(n.prime1)) | |
, l = a.toRed(r.mont(n.prime2)) | |
, c = n.coefficient | |
, d = n.prime1 | |
, f = n.prime2 | |
, h = u.redPow(n.exponent1).fromRed() | |
, p = l.redPow(n.exponent2).fromRed() | |
, m = h.isub(p).imul(c).umod(d).imul(f); | |
return p.iadd(m).imul(i.unblinder).umod(n.modulus).toArrayLike(t, "be", s) | |
} | |
s.getr = o, | |
e.exports = s | |
} | |
).call(this, n("./node_modules/buffer/index.js").Buffer) | |
}, | |
"./node_modules/browserify-rsa/node_modules/bn.js/lib/bn.js": function(e, t, n) { | |
(function(e) { | |
!function(e, t) { | |
"use strict"; | |
function r(e, t) { | |
if (!e) | |
throw new Error(t || "Assertion failed") | |
} | |
function i(e, t) { | |
e.super_ = t; | |
var n = function() {}; | |
n.prototype = t.prototype, | |
e.prototype = new n, | |
e.prototype.constructor = e | |
} | |
function o(e, t, n) { | |
if (o.isBN(e)) | |
return e; | |
this.negative = 0, | |
this.words = null, | |
this.length = 0, | |
this.red = null, | |
null !== e && ("le" !== t && "be" !== t || (n = t, | |
t = 10), | |
this._init(e || 0, t || 10, n || "be")) | |
} | |
var s; | |
"object" == typeof e ? e.exports = o : t.BN = o, | |
o.BN = o, | |
o.wordSize = 26; | |
try { | |
s = n(9).Buffer | |
} catch (e) {} | |
function a(e, t, n) { | |
for (var i = 0, o = Math.min(e.length, n), s = 0, a = t; a < o; a++) { | |
var u, l = e.charCodeAt(a) - 48; | |
i <<= 4, | |
i |= u = l >= 49 && l <= 54 ? l - 49 + 10 : l >= 17 && l <= 22 ? l - 17 + 10 : l, | |
s |= u | |
} | |
return r(!(240 & s), "Invalid character in " + e), | |
i | |
} | |
function u(e, t, n, i) { | |
for (var o = 0, s = 0, a = Math.min(e.length, n), u = t; u < a; u++) { | |
var l = e.charCodeAt(u) - 48; | |
o *= i, | |
s = l >= 49 ? l - 49 + 10 : l >= 17 ? l - 17 + 10 : l, | |
r(l >= 0 && s < i, "Invalid character"), | |
o += s | |
} | |
return o | |
} | |
function l(e, t) { | |
e.words = t.words, | |
e.length = t.length, | |
e.negative = t.negative, | |
e.red = t.red | |
} | |
if (o.isBN = function(e) { | |
return e instanceof o || null !== e && "object" == typeof e && e.constructor.wordSize === o.wordSize && Array.isArray(e.words) | |
} | |
, | |
o.max = function(e, t) { | |
return e.cmp(t) > 0 ? e : t | |
} | |
, | |
o.min = function(e, t) { | |
return e.cmp(t) < 0 ? e : t | |
} | |
, | |
o.prototype._init = function(e, t, n) { | |
if ("number" == typeof e) | |
return this._initNumber(e, t, n); | |
if ("object" == typeof e) | |
return this._initArray(e, t, n); | |
"hex" === t && (t = 16), | |
r(t === (0 | t) && t >= 2 && t <= 36); | |
var i = 0; | |
"-" === (e = e.toString().replace(/\s+/g, ""))[0] && i++, | |
16 === t ? this._parseHex(e, i) : this._parseBase(e, t, i), | |
"-" === e[0] && (this.negative = 1), | |
this._strip(), | |
"le" === n && this._initArray(this.toArray(), t, n) | |
} | |
, | |
o.prototype._initNumber = function(e, t, n) { | |
e < 0 && (this.negative = 1, | |
e = -e), | |
e < 67108864 ? (this.words = [67108863 & e], | |
this.length = 1) : e < 4503599627370496 ? (this.words = [67108863 & e, e / 67108864 & 67108863], | |
this.length = 2) : (r(e < 9007199254740992), | |
this.words = [67108863 & e, e / 67108864 & 67108863, 1], | |
this.length = 3), | |
"le" === n && this._initArray(this.toArray(), t, n) | |
} | |
, | |
o.prototype._initArray = function(e, t, n) { | |
if (r("number" == typeof e.length), | |
e.length <= 0) | |
return this.words = [0], | |
this.length = 1, | |
this; | |
this.length = Math.ceil(e.length / 3), | |
this.words = new Array(this.length); | |
for (var i = 0; i < this.length; i++) | |
this.words[i] = 0; | |
var o, s, a = 0; | |
if ("be" === n) | |
for (i = e.length - 1, | |
o = 0; i >= 0; i -= 3) | |
s = e[i] | e[i - 1] << 8 | e[i - 2] << 16, | |
this.words[o] |= s << a & 67108863, | |
this.words[o + 1] = s >>> 26 - a & 67108863, | |
(a += 24) >= 26 && (a -= 26, | |
o++); | |
else if ("le" === n) | |
for (i = 0, | |
o = 0; i < e.length; i += 3) | |
s = e[i] | e[i + 1] << 8 | e[i + 2] << 16, | |
this.words[o] |= s << a & 67108863, | |
this.words[o + 1] = s >>> 26 - a & 67108863, | |
(a += 24) >= 26 && (a -= 26, | |
o++); | |
return this._strip() | |
} | |
, | |
o.prototype._parseHex = function(e, t) { | |
this.length = Math.ceil((e.length - t) / 6), | |
this.words = new Array(this.length); | |
for (var n = 0; n < this.length; n++) | |
this.words[n] = 0; | |
var r, i, o = 0; | |
for (n = e.length - 6, | |
r = 0; n >= t; n -= 6) | |
i = a(e, n, n + 6), | |
this.words[r] |= i << o & 67108863, | |
this.words[r + 1] |= i >>> 26 - o & 4194303, | |
(o += 24) >= 26 && (o -= 26, | |
r++); | |
n + 6 !== t && (i = a(e, t, n + 6), | |
this.words[r] |= i << o & 67108863, | |
this.words[r + 1] |= i >>> 26 - o & 4194303), | |
this._strip() | |
} | |
, | |
o.prototype._parseBase = function(e, t, n) { | |
this.words = [0], | |
this.length = 1; | |
for (var r = 0, i = 1; i <= 67108863; i *= t) | |
r++; | |
r--, | |
i = i / t | 0; | |
for (var o = e.length - n, s = o % r, a = Math.min(o, o - s) + n, l = 0, c = n; c < a; c += r) | |
l = u(e, c, c + r, t), | |
this.imuln(i), | |
this.words[0] + l < 67108864 ? this.words[0] += l : this._iaddn(l); | |
if (0 !== s) { | |
var d = 1; | |
for (l = u(e, c, e.length, t), | |
c = 0; c < s; c++) | |
d *= t; | |
this.imuln(d), | |
this.words[0] + l < 67108864 ? this.words[0] += l : this._iaddn(l) | |
} | |
} | |
, | |
o.prototype.copy = function(e) { | |
e.words = new Array(this.length); | |
for (var t = 0; t < this.length; t++) | |
e.words[t] = this.words[t]; | |
e.length = this.length, | |
e.negative = this.negative, | |
e.red = this.red | |
} | |
, | |
o.prototype._move = function(e) { | |
l(e, this) | |
} | |
, | |
o.prototype.clone = function() { | |
var e = new o(null); | |
return this.copy(e), | |
e | |
} | |
, | |
o.prototype._expand = function(e) { | |
for (; this.length < e; ) | |
this.words[this.length++] = 0; | |
return this | |
} | |
, | |
o.prototype._strip = function() { | |
for (; this.length > 1 && 0 === this.words[this.length - 1]; ) | |
this.length--; | |
return this._normSign() | |
} | |
, | |
o.prototype._normSign = function() { | |
return 1 === this.length && 0 === this.words[0] && (this.negative = 0), | |
this | |
} | |
, | |
"undefined" != typeof Symbol && "function" == typeof Symbol.for) | |
try { | |
o.prototype[Symbol.for("nodejs.util.inspect.custom")] = c | |
} catch (e) { | |
o.prototype.inspect = c | |
} | |
else | |
o.prototype.inspect = c; | |
function c() { | |
return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">" | |
} | |
var d = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"] | |
, f = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] | |
, h = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176]; | |
o.prototype.toString = function(e, t) { | |
var n; | |
if (t = 0 | t || 1, | |
16 === (e = e || 10) || "hex" === e) { | |
n = ""; | |
for (var i = 0, o = 0, s = 0; s < this.length; s++) { | |
var a = this.words[s] | |
, u = (16777215 & (a << i | o)).toString(16); | |
n = 0 !== (o = a >>> 24 - i & 16777215) || s !== this.length - 1 ? d[6 - u.length] + u + n : u + n, | |
(i += 2) >= 26 && (i -= 26, | |
s--) | |
} | |
for (0 !== o && (n = o.toString(16) + n); n.length % t != 0; ) | |
n = "0" + n; | |
return 0 !== this.negative && (n = "-" + n), | |
n | |
} | |
if (e === (0 | e) && e >= 2 && e <= 36) { | |
var l = f[e] | |
, c = h[e]; | |
n = ""; | |
var p = this.clone(); | |
for (p.negative = 0; !p.isZero(); ) { | |
var m = p.modrn(c).toString(e); | |
n = (p = p.idivn(c)).isZero() ? m + n : d[l - m.length] + m + n | |
} | |
for (this.isZero() && (n = "0" + n); n.length % t != 0; ) | |
n = "0" + n; | |
return 0 !== this.negative && (n = "-" + n), | |
n | |
} | |
r(!1, "Base should be between 2 and 36") | |
} | |
, | |
o.prototype.toNumber = function() { | |
var e = this.words[0]; | |
return 2 === this.length ? e += 67108864 * this.words[1] : 3 === this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 * this.words[1] : this.length > 2 && r(!1, "Number can only safely store up to 53 bits"), | |
0 !== this.negative ? -e : e | |
} | |
, | |
o.prototype.toJSON = function() { | |
return this.toString(16, 2) | |
} | |
, | |
s && (o.prototype.toBuffer = function(e, t) { | |
return this.toArrayLike(s, e, t) | |
} | |
), | |
o.prototype.toArray = function(e, t) { | |
return this.toArrayLike(Array, e, t) | |
} | |
; | |
function p(e, t, n) { | |
n.negative = t.negative ^ e.negative; | |
var r = e.length + t.length | 0; | |
n.length = r, | |
r = r - 1 | 0; | |
var i = 0 | e.words[0] | |
, o = 0 | t.words[0] | |
, s = i * o | |
, a = 67108863 & s | |
, u = s / 67108864 | 0; | |
n.words[0] = a; | |
for (var l = 1; l < r; l++) { | |
for (var c = u >>> 26, d = 67108863 & u, f = Math.min(l, t.length - 1), h = Math.max(0, l - e.length + 1); h <= f; h++) { | |
var p = l - h | 0; | |
c += (s = (i = 0 | e.words[p]) * (o = 0 | t.words[h]) + d) / 67108864 | 0, | |
d = 67108863 & s | |
} | |
n.words[l] = 0 | d, | |
u = 0 | c | |
} | |
return 0 !== u ? n.words[l] = 0 | u : n.length--, | |
n._strip() | |
} | |
o.prototype.toArrayLike = function(e, t, n) { | |
this._strip(); | |
var i = this.byteLength() | |
, o = n || Math.max(1, i); | |
r(i <= o, "byte array longer than desired length"), | |
r(o > 0, "Requested array length <= 0"); | |
var s = function(e, t) { | |
return e.allocUnsafe ? e.allocUnsafe(t) : new e(t) | |
}(e, o); | |
return this["_toArrayLike" + ("le" === t ? "LE" : "BE")](s, i), | |
s | |
} | |
, | |
o.prototype._toArrayLikeLE = function(e, t) { | |
for (var n = 0, r = 0, i = 0, o = 0; i < this.length; i++) { | |
var s = this.words[i] << o | r; | |
e[n++] = 255 & s, | |
n < e.length && (e[n++] = s >> 8 & 255), | |
n < e.length && (e[n++] = s >> 16 & 255), | |
6 === o ? (n < e.length && (e[n++] = s >> 24 & 255), | |
r = 0, | |
o = 0) : (r = s >>> 24, | |
o += 2) | |
} | |
if (n < e.length) | |
for (e[n++] = r; n < e.length; ) | |
e[n++] = 0 | |
} | |
, | |
o.prototype._toArrayLikeBE = function(e, t) { | |
for (var n = e.length - 1, r = 0, i = 0, o = 0; i < this.length; i++) { | |
var s = this.words[i] << o | r; | |
e[n--] = 255 & s, | |
n >= 0 && (e[n--] = s >> 8 & 255), | |
n >= 0 && (e[n--] = s >> 16 & 255), | |
6 === o ? (n >= 0 && (e[n--] = s >> 24 & 255), | |
r = 0, | |
o = 0) : (r = s >>> 24, | |
o += 2) | |
} | |
if (n >= 0) | |
for (e[n--] = r; n >= 0; ) | |
e[n--] = 0 | |
} | |
, | |
Math.clz32 ? o.prototype._countBits = function(e) { | |
return 32 - Math.clz32(e) | |
} | |
: o.prototype._countBits = function(e) { | |
var t = e | |
, n = 0; | |
return t >= 4096 && (n += 13, | |
t >>>= 13), | |
t >= 64 && (n += 7, | |
t >>>= 7), | |
t >= 8 && (n += 4, | |
t >>>= 4), | |
t >= 2 && (n += 2, | |
t >>>= 2), | |
n + t | |
} | |
, | |
o.prototype._zeroBits = function(e) { | |
if (0 === e) | |
return 26; | |
var t = e | |
, n = 0; | |
return 0 == (8191 & t) && (n += 13, | |
t >>>= 13), | |
0 == (127 & t) && (n += 7, | |
t >>>= 7), | |
0 == (15 & t) && (n += 4, | |
t >>>= 4), | |
0 == (3 & t) && (n += 2, | |
t >>>= 2), | |
0 == (1 & t) && n++, | |
n | |
} | |
, | |
o.prototype.bitLength = function() { | |
var e = this.words[this.length - 1] | |
, t = this._countBits(e); | |
return 26 * (this.length - 1) + t | |
} | |
, | |
o.prototype.zeroBits = function() { | |
if (this.isZero()) | |
return 0; | |
for (var e = 0, t = 0; t < this.length; t++) { | |
var n = this._zeroBits(this.words[t]); | |
if (e += n, | |
26 !== n) | |
break | |
} | |
return e | |
} | |
, | |
o.prototype.byteLength = function() { | |
return Math.ceil(this.bitLength() / 8) | |
} | |
, | |
o.prototype.toTwos = function(e) { | |
return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) : this.clone() | |
} | |
, | |
o.prototype.fromTwos = function(e) { | |
return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone() | |
} | |
, | |
o.prototype.isNeg = function() { | |
return 0 !== this.negative | |
} | |
, | |
o.prototype.neg = function() { | |
return this.clone().ineg() | |
} | |
, | |
o.prototype.ineg = function() { | |
return this.isZero() || (this.negative ^= 1), | |
this | |
} | |
, | |
o.prototype.iuor = function(e) { | |
for (; this.length < e.length; ) | |
this.words[this.length++] = 0; | |
for (var t = 0; t < e.length; t++) | |
this.words[t] = this.words[t] | e.words[t]; | |
return this._strip() | |
} | |
, | |
o.prototype.ior = function(e) { | |
return r(0 == (this.negative | e.negative)), | |
this.iuor(e) | |
} | |
, | |
o.prototype.or = function(e) { | |
return this.length > e.length ? this.clone().ior(e) : e.clone().ior(this) | |
} | |
, | |
o.prototype.uor = function(e) { | |
return this.length > e.length ? this.clone().iuor(e) : e.clone().iuor(this) | |
} | |
, | |
o.prototype.iuand = function(e) { | |
var t; | |
t = this.length > e.length ? e : this; | |
for (var n = 0; n < t.length; n++) | |
this.words[n] = this.words[n] & e.words[n]; | |
return this.length = t.length, | |
this._strip() | |
} | |
, | |
o.prototype.iand = function(e) { | |
return r(0 == (this.negative | e.negative)), | |
this.iuand(e) | |
} | |
, | |
o.prototype.and = function(e) { | |
return this.length > e.length ? this.clone().iand(e) : e.clone().iand(this) | |
} | |
, | |
o.prototype.uand = function(e) { | |
return this.length > e.length ? this.clone().iuand(e) : e.clone().iuand(this) | |
} | |
, | |
o.prototype.iuxor = function(e) { | |
var t, n; | |
this.length > e.length ? (t = this, | |
n = e) : (t = e, | |
n = this); | |
for (var r = 0; r < n.length; r++) | |
this.words[r] = t.words[r] ^ n.words[r]; | |
if (this !== t) | |
for (; r < t.length; r++) | |
this.words[r] = t.words[r]; | |
return this.length = t.length, | |
this._strip() | |
} | |
, | |
o.prototype.ixor = function(e) { | |
return r(0 == (this.negative | e.negative)), | |
this.iuxor(e) | |
} | |
, | |
o.prototype.xor = function(e) { | |
return this.length > e.length ? this.clone().ixor(e) : e.clone().ixor(this) | |
} | |
, | |
o.prototype.uxor = function(e) { | |
r |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment