Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/.browserslistrc b/.browserslistrc deleted file mode 100644 index 4c59238eb..000000000 --- a/.browserslistrc +++ /dev/null @@ -1 +0,0 @@ -last 2 version diff --git a/.eslintignore b/.eslintignore index d4ca6c5bc..dd8a1d6f2 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,4 +4,5 @@ /scripts /node_modules /packages/**/node_modules -/packages/**/dist \ No newline at end of file +/packages/**/dist +/packages/artplayer-document \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index 8141c16d7..fca115c83 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,7 @@ { - "parser": "babel-eslint", + "parser": "@babel/eslint-parser", "extends": [ - "airbnb-base", + "standard", "prettier" ], "env": { @@ -11,12 +11,23 @@ "rules": { "no-shadow": 0, "no-param-reassign": 0, + "no-restricted-exports": 0, + "no-loss-of-precision": 0, + "no-promise-executor-return": 0, + "no-unreachable-loop": 0, + "no-unsafe-optional-chaining": 0, + "no-useless-backreference": 0, + "default-case-last": 0, + "no-nonoctal-decimal-escape": 0, "prefer-object-spread": 0, "prefer-destructuring": 0, "arrow-body-style": 0, + "accessor-pairs": 0, "import/named": 0 }, "parserOptions": { - "sourceType": "module" + "sourceType": "module", + "ecmaVersion": 8, + "requireConfigFile": false } } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7f134bcf2..ebbba4a9e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ node_modules examples commit.json package-lock.json +.size-snapshot.json yarn.lock \ No newline at end of file diff --git a/.size-snapshot.json b/.size-snapshot.json deleted file mode 100644 index f246da923..000000000 --- a/.size-snapshot.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "packages/artplayer/dist/artplayer.js": { - "bundled": 190385, - "minified": 110834, - "gzipped": 26131 - }, - "packages/artplayer-plugin-backlight/dist/artplayer-plugin-backlight.js": { - "bundled": 4629, - "minified": 1985, - "gzipped": 955 - }, - "packages/artplayer-tool-github/dist/artplayer-tool-github.js": { - "bundled": 12660, - "minified": 12305, - "gzipped": 4307 - }, - "packages/artplayer-plugin-gif/dist/artplayer-plugin-gif.js": { - "bundled": 98490, - "minified": 28883, - "gzipped": 10422 - }, - "packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js": { - "bundled": 15973, - "minified": 7709, - "gzipped": 2786 - }, - "packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js": { - "bundled": 24161, - "minified": 12813, - "gzipped": 4163 - }, - "packages/artplayer-vue/dist/artplayer-vue.js": { - "bundled": 191944, - "minified": 111758, - "gzipped": 26250 - }, - "packages/artplayer-react/dist/artplayer-react.js": { - "bundled": 273879, - "minified": 140344, - "gzipped": 35380 - }, - "artplayer-plugin-backlight.js": { - "bundled": 4678, - "minified": 2027, - "gzipped": 969 - }, - "artplayer.js": { - "bundled": 210581, - "minified": 121271, - "gzipped": 28066 - }, - "artplayer-plugin-danmuku.js": { - "bundled": 25668, - "minified": 13645, - "gzipped": 4422 - }, - "artplayer-plugin-gif.js": { - "bundled": 98584, - "minified": 28937, - "gzipped": 10434 - }, - "artplayer-react.js": { - "bundled": 294866, - "minified": 151155, - "gzipped": 37283 - }, - "artplayer-tool-github.js": { - "bundled": 12711, - "minified": 12347, - "gzipped": 4310 - }, - "artplayer-tool-thumbnail.js": { - "bundled": 17324, - "minified": 8545, - "gzipped": 3060 - }, - "artplayer-vue.js": { - "bundled": 212235, - "minified": 122243, - "gzipped": 28253 - }, - "artplayer-plugin-ass.js": { - "bundled": 2292, - "minified": 1227, - "gzipped": 611 - } -} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f5cf04ab4..000000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: node_js - -node_js: - - stable - -before_script: - - npm install - - npm i packages/* && lerna bootstrap --hoist - -script: - - npm run lint - - npm run build:all - - npm run test - -after_success: - - npm run sizereport diff --git a/README-CN.md b/README-CN.md deleted file mode 100644 index 43156dec0..000000000 --- a/README-CN.md +++ /dev/null @@ -1,132 +0,0 @@ -# ArtPlayer.js - -> :art: ArtPlayer.js 是一个现代全功能的 HTML5 视频播放器 - -[](https://www.travis-ci.org/zhw2590582/ArtPlayer) - - - -[](https://www.npmjs.com/package/artplayer) -[](https://www.codacy.com/app/zhw2590582/ArtPlayer?utm_source=github.com&utm_medium=referral&utm_content=zhw2590582/ArtPlayer&utm_campaign=Badge_Grade) - - - -## Features - -- 大小 - 缩小并压缩后的大小只有`25kb` -- 字幕 - 支持 `.VTT`, `.ASS` 和 `.SRT` 格式 -- 自定义 - `右键菜单`, `业务图层`, `视频控制器` 和 `设置面板` -- 控制器 - `画质切换`, `字幕切换`, `播放速度`, `长宽比`, `视频翻转`, `全屏`, `画中画`, `截图`, `缩略图`, `自适应尺寸`, `高亮` 和 `热键`... -- 内建 - `打开本地字幕`, `打开本地视频`, `迷你进度条`, `网络监测` 和 `字幕时间偏移` -- 集成 - 容易与其它依赖集成:`flv.js`, `hls.js`, `dash.js`, `shaka-player`, `webtorrent`... -- 代码 - 纯 `ES6` 和 `SASS`, 高解耦的代码, 清晰的结构, 容易跟踪 `Bug` 和添加新功能 -- 文档 - 详尽的接口文档和丰富的代码演示 -- 接口 - 丰富的接口和响应事件, 容易对接到业务或者自定义插件 -- 多语言 - 支持控件的国际化 - -## 生态 - -| 项目 | 描述 | 演示 | -| --------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| [artplayer-plugin-danmuku](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-danmuku) | 弹幕库插件 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=danmuku) | -| [artplayer-plugin-gif](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-gif) | GIF 生成插件 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif) | -| [artplayer-plugin-backlight](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-backlight) | 背光插件 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight) | -| [artplayer-tool-thumbnail](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-thumbnail) | 缩略图生成工具 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-thumbnail.js&example=thumbnail) | -| [artplayer-tool-github](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-github) | Github 弹幕库工具 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-github.js%0A.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=github) | | -| [artplayer-react](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-react) | React 组件 | [demo](https://codesandbox.io/s/n74859y9rl) | -| [artplayer-vue](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-vue) | Vue 组件 | [demo](https://codesandbox.io/s/thirsty-sunset-3lz7m) | - -## 主页 - -[https://artplayer.org](https://artplayer.org) - -## 手机端演示 - - - -## 文档 - -[https://artplayer.org/document](https://artplayer.org/document) - -## 安装 - -通过 `npm` 安装: - -```bash -$ npm install artplayer -``` - -或者通过 `yarn` 安装: - -```bash -$ yarn add artplayer -``` - -```js -import Artplayer from 'artplayer'; -``` - -或者直接引入`umd`文件: - -```html - -``` - -或者从 jsDelivr CDN 引入: - -```html - -``` - -将会导出全局变量到`window.Artplayer`. - -## 使用 - -```html -
-``` - -```js -var art = new Artplayer({ - container: '.artplayer-app', - url: 'path/to/video.mp4', -}); -``` - -## 贡献 - -安装依赖: - -```bash -$ npm install -$ npm run bootstrap -``` - -运行开发人员模式,然后选择要开发的项目: - -```bash -$ npm run dev -``` - -开启网页服务器: - -```bash -$ npm start -``` - -## 捐助 - -我们通过这些渠道接受捐赠: - -- [Patreon](https://www.patreon.com/artplayer) -- [Paypal](https://www.paypal.me/harveyzack) -- [微信支付](./images/wechatpay.jpg) -- [支付宝](./images/alipay.jpg) - -## QQ 群 - - - -## 证书 - -MIT © [Harvey Zack](https://sleepy.im/) diff --git a/README.md b/README.md index 08e0a4875..576828dd8 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,38 @@ -# ArtPlayer.js ++ :art: ArtPlayer.js is a modern and full featured HTML5 video player +
-> :art: ArtPlayer.js is a modern and full featured HTML5 video player +
+
+
+
+
+
+
+ ・ + Online Editor + ・ + Danmuku Demo + ・ + API Document + ・ +
- +
+
+
+
+
65535||r>65535)throw"Width/Height invalid.";e[o++]=71,e[o++]=73,e[o++]=70,e[o++]=56,e[o++]=57,e[o++]=97;if(e[o++]=255&t,e[o++]=t>>8&255,e[o++]=255&r,e[o++]=r>>8&255,e[o++]=0|(null!==s?128:0),e[o++]=0,e[o++]=0,null!==a){if(a<0||a>65535)throw"Loop count invalid.";e[o++]=33,e[o++]=255,e[o++]=11,e[o++]=78,e[o++]=69,e[o++]=84,e[o++]=83,e[o++]=67,e[o++]=65,e[o++]=80,e[o++]=69,e[o++]=50,e[o++]=46,e[o++]=48,e[o++]=3,e[o++]=1,e[o++]=255&a,e[o++]=a>>8&255,e[o++]=0}var c=!1;this.addFrame=function(t,r,i,a,d,l){if(!0===c&&(--o,c=!1),l=l===n?{}:l,t<0||r<0||t>65535||r>65535)throw"x/y invalid.";if(i<=0||a<=0||i>65535||a>65535)throw"Width/Height invalid.";if(d.length256||t&t-1)throw"Invalid code/color length, must be power of 2 and 2 .. 256.";return t}(f),m=0;g>>=1;)++m;g=1< .")}return e}(e);if(!Ot[r]){Ot[r]=!0;var n="";t&&t._owner&&t._owner!==I.current&&(n=" It was passed a child from "+F(t._owner.type)+"."),V(t),Y(!1,'Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',r,n),V(null)}}}function jt(t,e){if("object"==typeof t)if(Array.isArray(t))for(var r=0;r ".concat(ae(t)," ".concat(ae(t)," ".concat(ot(t)," ".concat(ot(t)," ".concat(nt(t)," ".concat(nt(t)," ".concat(G(t)," We could not find what you were looking for. Please contact the owner of the site that linked you to the original URL and let them know their link is broken. Your Docusaurus site did not load properly. A very common reason is a wrong site baseUrl configuration. Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+' We suggest trying baseUrl = All other services can be used only after user Provider: Service url: Dependency: Request method Request Sample: Sample response for success request: NOTE: The following parameters is included in all services (different values). If no parameters for body then pass blank, like body:”” example: Rules for signature: 0: Success Other codes all represent failure, find more details in Code List Require confirmation from AWDA to implement to production after complete UAT for all services. You can use API tools to test some services during your development。 You can check the response code or contact us when you have problems during the testing All services using POST method to send request(Including Inquiry) All requests and responses are JSON format. NOTE: Header Content-Type -> application/json UTF-8 encoding All requests require signature Provider : AWDA User : Third party Mandatory : YES Description : All other services can be used only after user registration success Provider : AWDA User : Third party Mandatory : NO Description : Get the authorization list and check the authorization status Provider : AWDA User : Third party Mandatory : NO Description : Customer complete the authorization in the pages Provider : AWDA User : Third party Mandatory : NO Description : To receive the authorization status Provider : AWDA User : Third party Mandatory : YES Description : To inquiry bank card status Provider : AWDA User : Third party Mandatory : YES Description : Get the bank list for bank card input Provider : AWDA User : Third party Mandatory : YES Description : Verify and submit bank card Provider : AWDA User : Third party Mandatory : YES Description : Submit loan info, including (personal info, work info and emergency contact) Provider : AWDA User : Third party Mandatory : YES Description : Get loan agreement Provider : AWDA User : Third party Mandatory : YES Description : Sign agreement (Confirm disbursement) Provider : AWDA User : Third party Mandatory : YES Description : Get loan info based on loan number (include repayment schedule if disbursed) Provider : AWDA User : Third party Mandatory : YES Description : Get the repayment VA Provider: Third party User : AWDA Mandatory: NO Description : Push the loan status update to Third party Provider : AWDA User : Third party Mandatory : YES Description : Verify Customer Provider : AWDA User : Third party Mandatory : NO Description : To get the token which used for api Upload Image (1) Provider : AWDA User : Third party Mandatory : NO Description : By sending file stream with token Provider : AWDA User : Third party Mandatory : NO Description : By sending base64 or url format Provider : AWDA User : Third party Mandatory : NO Description : Redirect to the specific H5 pages ' + displayFn(context) + ' Your Docusaurus site did not load properly. A very common reason is a wrong site baseUrl configuration. Current configured baseUrl = ${baseUrl} ${baseUrl==='/'?' (default value)':''} We suggest trying baseUrl = ".concat(item, " ${item} ".concat(item, " ${item} ".concat(escape(msg), " ${escape(item)} ${escape(msg)} ${escape(item)}1){for(var d=Array(p),y=0;y0&&!r.paused&&!r.ended&&r.readyState>2)}})}(e,this),function(t,e){var r=t.template,n=r.$container,o=r.$player,i=r.$video;Qt(e,"autoSize",{get:function(){return kt(n,"art-auto-size")},set:function(r){if(r){var a=i.videoWidth,c=i.videoHeight,l=n.getBoundingClientRect(),s=l.width,u=l.height,f=a/c,p=s/u;if(xt(n,"art-auto-size"),p>f)St(o,"width","".concat(u*f/s*100,"%")),St(o,"height","100%");else{var d=s/f/u*100;St(o,"width","100%"),St(o,"height","".concat(d,"%"))}t.emit("autoSize",{width:e.width,height:e.height})}else Ot(n,"art-auto-size"),St(o,"width",null),St(o,"height",null),t.emit("autoSize")}})}(e,this),function(t,e){Qt(e,"rect",{get:function(){return t.template.$player.getBoundingClientRect()}}),["bottom","height","left","right","top","width"].forEach((function(t){Qt(e,t,{get:function(){return e.rect[t]}})})),Qt(e,"x",{get:function(){return e.left+window.pageXOffset}}),Qt(e,"y",{get:function(){return e.top+window.pageYOffset}})}(e,this),function(t,e){var r=t.template.$player,n=t.i18n,o=t.notice;Qt(e,"flip",{get:function(){return r.dataset.flip},set:function(i){i||(i="normal");var a=["normal","horizontal","vertical"];qt(a.includes(i),"'flip' only accept ".concat(a.toString()," as parameters")),"normal"===i?delete r.dataset.flip:(e.rotate=!1,r.dataset.flip=i);var c=i.replace(i[0],i[0].toUpperCase());o.show="".concat(n.get("Flip"),": ").concat(n.get(c)),t.emit("flip",i)}}),Qt(e,"flipReset",{set:function(t){if(t&&e.flip){var r=e.flip;e.flip=r}}})}(e,this),function(t,e){var r=t.template.$undercover;Qt(e,"light",{get:function(){return"none"!==Et(r,"display",!1)},set:function(e){St(r,"display",e?"block":"none"),t.emit("light",e)}})}(e,this),function(t,e){var r=t.i18n,n=t.option,o=t.storage,i=t.events.proxy,a=t.template,c=a.$player,l=a.$miniClose,s=a.$miniTitle,u=a.$miniHeader,f="",p=!1,d=0,y=0,h=0,m=0;i(u,"mousedown",(function(t){p=!0,d=t.pageX,y=t.pageY,h=e.left,m=e.top})),i(document,"mousemove",(function(t){if(p){xt(c,"art-is-dragging");var e=m+t.pageY-y,r=h+t.pageX-d;St(c,"top","".concat(e,"px")),St(c,"left","".concat(r,"px")),o.set("top",e),o.set("left",r)}})),i(document,"mouseup",(function(){p=!1,Ot(c,"art-is-dragging")})),i(l,"click",(function(){e.mini=!1,p=!1,Ot(c,"art-is-dragging")})),jt(s,n.title||r.get("Mini player")),Qt(e,"mini",{get:function(){return kt(c,"art-mini")},set:function(r){if(r){e.autoSize=!1,f=c.style.cssText,xt(c,"art-mini");var i=o.get("top"),a=o.get("left");if(i&&a)St(c,"top","".concat(i,"px")),St(c,"left","".concat(a,"px")),Tt(u)||(o.del("top"),o.del("left"),e.mini=!0);else{var l=document.body,s=l.clientHeight-e.height-50,p=l.clientWidth-e.width-50;o.set("top",s),o.set("left",p),St(c,"top","".concat(s,"px")),St(c,"left","".concat(p,"px"))}e.aspectRatio=!1,e.playbackRate=!1,t.emit("mini",!0)}else c.style.cssText=f,Ot(c,"art-mini"),St(c,"top",null),St(c,"left",null),e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=n.autoSize,t.emit("mini")}}),Qt(e,"miniToggle",{set:function(t){t&&(e.mini=!e.mini)}})}(e,this),function(t,e){var r=[];Qt(e,"loop",{get:function(){return r},set:function(n){if(Array.isArray(n)&&"number"==typeof n[0]&&"number"==typeof n[1]){var o=oe(n[0],0,Math.min(n[1],e.duration)),i=oe(n[1],o,e.duration);i-o>=1?(r=[o,i],t.emit("loop",r)):(r=[],t.emit("loop"))}else r=[],t.emit("loop")}}),t.on("video:timeupdate",(function(){r.length&&(e.currentTimePage Not Found
Keywords: "+e.keywords.substring(0,i)+''+e.keywords.substring(i,a)+""+e.keywords.substring(a,e.keywords.length)+"";return this.getHit(e,s)},t.getContentHit=function(e,t){for(var n=t[0],i=t[0]+t[1],a=n,s=i,r=!0,l=!0,o=0;o<3;o++){var u=e.content.lastIndexOf(" ",a-2),c=e.content.lastIndexOf(".",a-2);if(c>0&&c>u){a=c+1,r=!1;break}if(u<0){a=0,r=!1;break}a=u+1}for(var h=0;h<10;h++){var g=e.content.indexOf(" ",s+1),d=e.content.indexOf(".",s+1);if(d>0&&d=0;u--)if(void 0!==(s=t(e,n[u],a))){o=!0;break}return o?(r||"function"!=typeof s||(s=this.mv(s,n,i)),s):!r&&""},ls:function(e,t,n,i,r){var s=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(u(e.call(t,i)),t,n)),this.options.delimiters=s,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,i,r,s,o){var a,u=t[t.length-1],c=e.call(u);return"function"==typeof c?!!i||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,a.substring(r,s),o)):c},mv:function(e,t,n){var i=t[t.length-1],r=e.call(i);return"function"==typeof r?this.ct(u(r.call(i)),i,n):r},sub:function(e,t,n,i){var r=this.subs[e];r&&(this.activeSub=e,r(t,n,this,i),this.activeSub=!1)}};var n=/&/g,i=//g,s=/\'/g,o=/\"/g,a=/[&<>\"\']/;function u(e){return String(null==e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},7202:function(e,t,n){"use strict";var i,r,s,o=[n(801),n(7865),n(567),n(7981),n(2348),n(11)],a=-1,u=[],c=!1;function l(){i&&r&&(i=!1,r.length?u=r.concat(u):a=-1,u.length&&h())}function h(){if(!i){c=!1,i=!0;for(var e=u.length,t=setTimeout(l);e;){for(r=u,u=[];r&&++a.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},3682:function(e,t,n){const r=n(1239),a=n(53),i=new Set;function o(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...i,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(o.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(5145).resolve(t)],delete Prism.languages[e],n(5145)(t),i.add(e)}))}o.silent=!1,e.exports=o},5145:function(e,t,n){var r={"./":3682};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=5145},53:function(e){"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;nAuthorization list inquiry
Bank card inquiry
Bank card verification
Call back for authorization status
Eligible Check
Get bank list
Get loan information
Get repayment VA
Get the authorization detail page
Get the redirect url
Get the token for uploading image
Loan agreement inquiry
Push notification
Sign agreement
Submit loan
Upload Image - By sending file stream
Upload Image - By using base64 or url format
User Registration
Description#
Awda/welab-sun/api/user/registerNOPOSTRequest body#
Param Type Required Description body Yes -mobile String Yes Customer mobile number -name String Yes Customer name -nik String Yes Customer NIK -email String Yes Customer email { "body":{ "email": "xxx", "mobile": "xxx", "name": "xxx", "nik": "xxx" }, "timestamp":"1488363493", "signature":"B3C14758F4AF52AE8AA0D4CD1493B137", "appId":"111", "v":"1.0"}Response (Json format)#
Param Type Required Description code Integer Yes Status code message String Yes Code message result Object No Return data { "code":0, "message":"Permintaan berhasil", "result":null}Data dictionary
Marriage#
Code Description Note 10 Belum Menikah 11 Menikah 12 Cerai Education#
Code Description Note 14 Sekolah Dasar 16 SMP 13 SMA 15 Diploma/Politehnik 10 Sarjana 11 Master 12 Doctor 17 Lain-Lain House Ownership#
Code Description Note 10 Rumah Sendiri 11 Rumah Keluarga 12 Rumah Dinas 13 Sewa/Kontrak 14 Kost 15 Status Kredit 16 Lain-Lain Religion#
Code Description Note 10 Islam 11 Kristen Protestan 12 Kristen Katolik 13 Hindu 14 Budha 15 Kong Hu Cu Work Type#
Code Description Note 10 Tetap 11 Kontrak 12 Outsourcing 13 Pekerja Lepas 14 Pemilik Usaha Position#
Code Description Note 10 Direktur/General Manager 11 Manajer 12 Asisten Manajer 13 Staf 14 Pemilik Industry#
Code Description Note 10 Perdagangan Eceran / Grosir 11 Perbankan / Keuangan / Asuransi / Investasi 12 Manufaktur 13 Properti / Konstruksi 14 Pertambangan / Minyak / Gas 15 Pendidikan 16 Telekomunikasi 17 Pariwisata / Hotel / Perhotelan 18 Angkutan 19 PNS (Pemerintah) 20 Konsultan / Akuntansi / Jasa Profesional 21 BUMN (Badan Usaha Milik Negara) 22 Perkebunan / Pertanian 23 TNI / Polisi (Militer / Polisi) 24 Hukum 25 Teknologi 26 Media / Hiburan 27 Pemasaran iklan 28 Makanan & Minuman 29 Layanan medis 30 Perikanan Office Ownership#
Code Description Note 10 Milik Sendiri 11 Sewa Company Size#
Code Description Note 10 1-5 11 5-10 12 10-25 13 25-50 14 >50 Occupation#
Code Description Note 11 Pensiunan/Purnawirawan 12 Pelayaran/Pelaut 13 Guru/Pendidikan 14 Jasa 15 Dokter/Bidan/Mantri 16 Ojek Motor 17 Sopir 18 Peternak 19 Pelajar/Mahasiswa 20 Buruh/PRT 21 Pengrajin Tangan 23 Pedagang 24 Produksi 26 Sewa/Rent 27 Transportasi & Komunikasi 28 Hiburan 29 Pendidikan Non Formal 30 Hotel 31 Perangkat Desa 32 TNI/Polri 33 Atlet 34 Pengobatan Alternatif 2 ABRI 3 Pengacara 35 Jurnalis / Wartawan 37 Profesi 36 Wartawan 6 Lain-Lain 38 Pekerja Lepas Income source#
Code Description Note 10 Gaji/Upah 11 Laba Usaha 12 Uang Tabungan 13 Menjual/Menggadaikan Aset 14 Dari Keluarga/Teman/Sumber Lainnya Relationship with emergency contact#
Code Description Note 10 Pasangan 11 Orang Tua 12 Saudara Kandung 13 Anak 14 Teman Kantor Apply reason#
Code Description Note 10 Pembelian Handphone / Laptop / Elektronik 11 Tagihan Rutin 12 Liburan / Rekreasi 13 Pembayaran Pajak 14 Asuransi 15 Pengobatan Medis 16 Pendidikan 17 Konsumsi Rumah Tangga 18 Modal Usaha 19 Multiguna Document type#
Code Description Note bank_statement_3_months Bank statement for the last 3 months company_id_card ID_PNS receiptri salary_certificate salary_slip_3_months Salary slip for the last 3 months self_SKU_SIUP_TDP SK_PNS driver_license KTP Parameters Instructions
Instructions for API request parameters#
note
Name Description Type Mandatory Notes body Business parameters Object N Some APIs may require body timestamp Timestamp Long Y Accurate into a second appId Apply from AWDA String Y v Version code String N Default 1.0 signature Signature String Y All requests need signature { "body": "1111", "timestamp": 1488363493, "signature": "B3C14758F4AF52AE8AA0D4CD1493B137", "appId": "111", "v":"1.0"}Rules for signature#
B6F6E3F9ADF4D7558F54BC8B7D9869CCJava Sample Codes for Signature#
String[] keys = new String[map.size()];int i = 0;for (Map.Entry<String, Object> entry : map.entrySet()) { keys[i++] = entry.getKey();}Arrays.sort(keys);StringBuilder stringBuilder = new StringBuilder();for (String key : keys) { stringBuilder.append(key); stringBuilder.append(":"); stringBuilder.append(map.get(key));}stringBuilder.append(secret);String str=stringBuilder.toString();String encodeStr = DigestUtils.md5Hex(str).toUpperCase();return encodeStr ;API Response#
Parameters DescriptionType Mandatory Notes code Status code Integer Y message Status description String Y Code description result Return data Object N When code=0, there will be business data returned inside result object Sample response for success request:#
{ "code": 0, "message": "Permintaan berhasil", "result": { "state": true }}Overview
Integration Guides#
Document Change Control#
Version Date Authors Summary of changes 1.0.0 2019.06.03 ZHIBO Thumbnails image url API Summary#
Service name Description user registration Authorization list inquiry Get the authorization detail page Call back for authorization status Bank card inquiry Get bank list Bank card verification Submit loan Loan agreement inquiry Sign agreement Get loan information Get repayment VA Push notification Eligible Check Get the token for uploading image Upload Image (1) Upload Image (2) Get the redirect url
(For H5 pages of Digital Signature, Loan detail and Repayment detail)Environment information#
https://sea-staging.wolaidai.comhttps://japi.maucash.idurl + service urlList Of Response Code#
Code Description 0 Success 1000 System is busy 1001 Repeat request 1002 Unvalid token 1003 Timestamp error or expired (only valid within 60s) 1004 Signature error 1005 appId invalid 1006 Parameters cannot be empty 1007 Parameters error 1008 User already existed 1009 User not found 1010 Loan not found 1012 Authorization info not found
Keywords: '+doc.keywords.substring(0,start)+''+doc.keywords.substring(start,end)+''+doc.keywords.substring(end,doc.keywords.length)+'';return this.getHit(doc,formattedTitle);}getContentHit(doc,position){const start=position[0];const end=position[0]+position[1];let previewStart=start;let previewEnd=end;let ellipsesBefore=true;let ellipsesAfter=true;for(let k=0;k<3;k++){const nextSpace=doc.content.lastIndexOf(' ',previewStart-2);const nextDot=doc.content.lastIndexOf('.',previewStart-2);if(nextDot>0&&nextDot>nextSpace){previewStart=nextDot+1;ellipsesBefore=false;break;}if(nextSpace<0){previewStart=0;ellipsesBefore=false;break;}previewStart=nextSpace+1;}for(let k=0;k<10;k++){const nextSpace=doc.content.indexOf(' ',previewEnd+1);const nextDot=doc.content.indexOf('.',previewEnd+1);if(nextDot>0&&nextDot
+ shortestValue: 'none',
+ shorthand: true
+ },
+ 'list-style-image' : {
+ canOverride: canOverride.generic.image,
+ componentOf: [
+ 'list-style'
+ ],
+ defaultValue: 'none'
+ },
+ 'list-style-position' : {
+ canOverride: canOverride.property.listStylePosition,
+ componentOf: [
+ 'list-style'
+ ],
+ defaultValue: 'outside',
+ shortestValue: 'inside'
+ },
+ 'list-style-type' : {
+ canOverride: canOverride.property.listStyleType,
+ componentOf: [
+ 'list-style'
+ ],
+ // NOTE: we can't tell the real default value here, it's 'disc' for
and 'decimal' for
+ // this is a hack, but it doesn't matter because this value will be either overridden or
+ // it will disappear at the final step anyway
+ defaultValue: 'decimal|disc',
+ shortestValue: 'none'
+ },
+ 'margin': {
+ breakUp: breakUp.fourValues,
+ canOverride: canOverride.generic.components([
+ canOverride.generic.unit,
+ canOverride.generic.unit,
+ canOverride.generic.unit,
+ canOverride.generic.unit
+ ]),
+ components: [
+ 'margin-top',
+ 'margin-right',
+ 'margin-bottom',
+ 'margin-left'
+ ],
+ defaultValue: '0',
+ propertyOptimizer: propertyOptimizers.margin,
+ restore: restore.fourValues,
+ shorthand: true,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'margin-bottom': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'margin'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'margin-top',
+ propertyOptimizer: propertyOptimizers.margin,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'margin-inline-end': {
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'margin-inline-start': {
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'margin-left': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'margin'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'margin-right',
+ propertyOptimizer: propertyOptimizers.margin,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'margin-right': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'margin'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'margin-left',
+ propertyOptimizer: propertyOptimizers.margin,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'margin-top': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'margin'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'margin-bottom',
+ propertyOptimizer: propertyOptimizers.margin,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'max-height': {
+ canOverride: canOverride.generic.unit,
+ defaultValue: 'none',
+ shortestValue: '0',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'max-width': {
+ canOverride: canOverride.generic.unit,
+ defaultValue: 'none',
+ shortestValue: '0',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'min-height': {
+ canOverride: canOverride.generic.unit,
+ defaultValue: '0',
+ shortestValue: '0',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'min-width': {
+ canOverride: canOverride.generic.unit,
+ defaultValue: '0',
+ shortestValue: '0',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'opacity': {
+ valueOptimizers: [
+ valueOptimizers.fraction,
+ valueOptimizers.precision
+ ]
+ },
+ 'outline': {
+ canOverride: canOverride.generic.components([
+ canOverride.generic.color,
+ canOverride.property.outlineStyle,
+ canOverride.generic.unit
+ ]),
+ components: [
+ 'outline-color',
+ 'outline-style',
+ 'outline-width'
+ ],
+ breakUp: breakUp.outline,
+ restore: restore.withoutDefaults,
+ defaultValue: '0',
+ propertyOptimizer: propertyOptimizers.outline,
+ shorthand: true,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'outline-color': {
+ canOverride: canOverride.generic.color,
+ componentOf: [
+ 'outline'
+ ],
+ defaultValue: 'invert',
+ shortestValue: 'red',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.color
+ ]
+ },
+ 'outline-style': {
+ canOverride: canOverride.property.outlineStyle,
+ componentOf: [
+ 'outline'
+ ],
+ defaultValue: 'none'
+ },
+ 'outline-width': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'outline'
+ ],
+ defaultValue: 'medium',
+ shortestValue: '0',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'overflow': {
+ canOverride: canOverride.property.overflow,
+ defaultValue: 'visible'
+ },
+ 'overflow-x': {
+ canOverride: canOverride.property.overflow,
+ defaultValue: 'visible'
+ },
+ 'overflow-y': {
+ canOverride: canOverride.property.overflow,
+ defaultValue: 'visible'
+ },
+ 'padding': {
+ breakUp: breakUp.fourValues,
+ canOverride: canOverride.generic.components([
+ canOverride.generic.unit,
+ canOverride.generic.unit,
+ canOverride.generic.unit,
+ canOverride.generic.unit
+ ]),
+ components: [
+ 'padding-top',
+ 'padding-right',
+ 'padding-bottom',
+ 'padding-left'
+ ],
+ defaultValue: '0',
+ propertyOptimizer: propertyOptimizers.padding,
+ restore: restore.fourValues,
+ shorthand: true,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'padding-bottom': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'padding'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'padding-top',
+ propertyOptimizer: propertyOptimizers.padding,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'padding-left': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'padding'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'padding-right',
+ propertyOptimizer: propertyOptimizers.padding,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'padding-right': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'padding'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'padding-left',
+ propertyOptimizer: propertyOptimizers.padding,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'padding-top': {
+ canOverride: canOverride.generic.unit,
+ componentOf: [
+ 'padding'
+ ],
+ defaultValue: '0',
+ oppositeTo: 'padding-bottom',
+ propertyOptimizer: propertyOptimizers.padding,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'position': {
+ canOverride: canOverride.property.position,
+ defaultValue: 'static'
+ },
+ 'right': {
+ canOverride: canOverride.property.right,
+ defaultValue: 'auto',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'row-gap': {
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'src': {
+ valueOptimizers: [
+ valueOptimizers.urlWhiteSpace,
+ valueOptimizers.urlPrefix,
+ valueOptimizers.urlQuotes
+ ]
+ },
+ 'stroke-width': {
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'text-align': {
+ canOverride: canOverride.property.textAlign,
+ // NOTE: we can't tell the real default value here, as it depends on default text direction
+ // this is a hack, but it doesn't matter because this value will be either overridden or
+ // it will disappear anyway
+ defaultValue: 'left|right'
+ },
+ 'text-decoration': {
+ canOverride: canOverride.property.textDecoration,
+ defaultValue: 'none'
+ },
+ 'text-indent': {
+ canOverride: canOverride.property.textOverflow,
+ defaultValue: 'none',
+ valueOptimizers: [
+ valueOptimizers.fraction,
+ valueOptimizers.zero
+ ]
+ },
+ 'text-overflow': {
+ canOverride: canOverride.property.textOverflow,
+ defaultValue: 'none'
+ },
+ 'text-shadow': {
+ canOverride: canOverride.property.textShadow,
+ defaultValue: 'none',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.zero,
+ valueOptimizers.color
+ ]
+ },
+ 'top': {
+ canOverride: canOverride.property.top,
+ defaultValue: 'auto',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'transform': {
+ canOverride: canOverride.property.transform,
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.degrees,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ],
+ vendorPrefixes: [
+ '-moz-',
+ '-ms-',
+ '-o-',
+ '-webkit-'
+ ]
+ },
+ 'transition': {
+ breakUp: breakUp.multiplex(breakUp.transition),
+ canOverride: canOverride.generic.components([
+ canOverride.property.transitionProperty,
+ canOverride.generic.time,
+ canOverride.generic.timingFunction,
+ canOverride.generic.time
+ ]),
+ components: [
+ 'transition-property',
+ 'transition-duration',
+ 'transition-timing-function',
+ 'transition-delay'
+ ],
+ defaultValue: 'none',
+ restore: restore.multiplex(restore.withoutDefaults),
+ shorthand: true,
+ valueOptimizers: [
+ valueOptimizers.time,
+ valueOptimizers.fraction
+ ],
+ vendorPrefixes: [
+ '-moz-',
+ '-ms-',
+ '-o-',
+ '-webkit-'
+ ]
+ },
+ 'transition-delay': {
+ canOverride: canOverride.generic.time,
+ componentOf: [
+ 'transition'
+ ],
+ defaultValue: '0s',
+ intoMultiplexMode: 'real',
+ valueOptimizers: [
+ valueOptimizers.time
+ ],
+ vendorPrefixes: [
+ '-moz-',
+ '-ms-',
+ '-o-',
+ '-webkit-'
+ ]
+ },
+ 'transition-duration': {
+ canOverride: canOverride.generic.time,
+ componentOf: [
+ 'transition'
+ ],
+ defaultValue: '0s',
+ intoMultiplexMode: 'real',
+ keepUnlessDefault: 'transition-delay',
+ valueOptimizers: [
+ valueOptimizers.time,
+ valueOptimizers.fraction
+ ],
+ vendorPrefixes: [
+ '-moz-',
+ '-ms-',
+ '-o-',
+ '-webkit-'
+ ]
+ },
+ 'transition-property': {
+ canOverride: canOverride.generic.propertyName,
+ componentOf: [
+ 'transition'
+ ],
+ defaultValue: 'all',
+ intoMultiplexMode: 'placeholder',
+ placeholderValue: '_', // it's a short value that won't match any property and still be a valid `transition-property`
+ vendorPrefixes: [
+ '-moz-',
+ '-ms-',
+ '-o-',
+ '-webkit-'
+ ]
+ },
+ 'transition-timing-function': {
+ canOverride: canOverride.generic.timingFunction,
+ componentOf: [
+ 'transition'
+ ],
+ defaultValue: 'ease',
+ intoMultiplexMode: 'real',
+ vendorPrefixes: [
+ '-moz-',
+ '-ms-',
+ '-o-',
+ '-webkit-'
+ ]
+ },
+ 'vertical-align': {
+ canOverride: canOverride.property.verticalAlign,
+ defaultValue: 'baseline',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'visibility': {
+ canOverride: canOverride.property.visibility,
+ defaultValue: 'visible'
+ },
+ '-webkit-tap-highlight-color': {
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.color
+ ]
+ },
+ '-webkit-margin-end': {
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'white-space': {
+ canOverride: canOverride.property.whiteSpace,
+ defaultValue: 'normal'
+ },
+ 'width': {
+ canOverride: canOverride.generic.unit,
+ defaultValue: 'auto',
+ shortestValue: '0',
+ valueOptimizers: [
+ valueOptimizers.whiteSpace,
+ valueOptimizers.fraction,
+ valueOptimizers.precision,
+ valueOptimizers.unit,
+ valueOptimizers.zero
+ ]
+ },
+ 'z-index': {
+ canOverride: canOverride.property.zIndex,
+ defaultValue: 'auto'
+ }
+};
+
+// generate vendor-prefixed configuration
+var vendorPrefixedConfiguration = {};
+
+function cloneDescriptor(propertyName, prefix) {
+ var clonedDescriptor = override(configuration[propertyName], {});
+
+ if ('componentOf' in clonedDescriptor) {
+ clonedDescriptor.componentOf = clonedDescriptor.componentOf.map(function (shorthandName) {
+ return prefix + shorthandName;
+ });
+ }
+
+ if ('components' in clonedDescriptor) {
+ clonedDescriptor.components = clonedDescriptor.components.map(function (longhandName) {
+ return prefix + longhandName;
+ });
+ }
+
+ if ('keepUnlessDefault' in clonedDescriptor) {
+ clonedDescriptor.keepUnlessDefault = prefix + clonedDescriptor.keepUnlessDefault;
+ }
+
+ return clonedDescriptor;
+}
+
+var vendorPrefixedConfiguration = {};
+
+for (var propertyName in configuration) {
+ var descriptor = configuration[propertyName];
+
+ if (!('vendorPrefixes' in descriptor)) {
+ continue;
+ }
+
+ for (var i = 0; i < descriptor.vendorPrefixes.length; i++) {
+ var prefix = descriptor.vendorPrefixes[i];
+ var clonedDescriptor = cloneDescriptor(propertyName, prefix);
+ delete clonedDescriptor.vendorPrefixes;
+
+ vendorPrefixedConfiguration[prefix + propertyName] = clonedDescriptor;
+ }
+
+ delete descriptor.vendorPrefixes;
+}
+
+module.exports = override(configuration, vendorPrefixedConfiguration);
+
+
+/***/ }),
+
+/***/ 9209:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var InvalidPropertyError = __webpack_require__(406);
+
+var wrapSingle = __webpack_require__(4082).single;
+
+var Token = __webpack_require__(7298);
+var Marker = __webpack_require__(2638);
+
+var formatPosition = __webpack_require__(7270);
+
+function _anyIsInherit(values) {
+ var i, l;
+
+ for (i = 0, l = values.length; i < l; i++) {
+ if (values[i][1] == 'inherit') {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function _colorFilter(validator) {
+ return function (value) {
+ return value[1] == 'invert' || validator.isColor(value[1]) || validator.isPrefixed(value[1]);
+ };
+}
+
+function _styleFilter(validator) {
+ return function (value) {
+ return value[1] != 'inherit' && validator.isStyleKeyword(value[1]) && !validator.isColorFunction(value[1]);
+ };
+}
+
+function _wrapDefault(name, property, configuration) {
+ var descriptor = configuration[name];
+ if (descriptor.doubleValues && descriptor.defaultValue.length == 2) {
+ return wrapSingle([
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, name],
+ [Token.PROPERTY_VALUE, descriptor.defaultValue[0]],
+ [Token.PROPERTY_VALUE, descriptor.defaultValue[1]]
+ ]);
+ } else if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {
+ return wrapSingle([
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, name],
+ [Token.PROPERTY_VALUE, descriptor.defaultValue[0]]
+ ]);
+ } else {
+ return wrapSingle([
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, name],
+ [Token.PROPERTY_VALUE, descriptor.defaultValue]
+ ]);
+ }
+}
+
+function _widthFilter(validator) {
+ return function (value) {
+ return value[1] != 'inherit' &&
+ (validator.isWidth(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) &&
+ !validator.isStyleKeyword(value[1]) &&
+ !validator.isColorFunction(value[1]);
+ };
+}
+
+function animation(property, configuration, validator) {
+ var duration = _wrapDefault(property.name + '-duration', property, configuration);
+ var timing = _wrapDefault(property.name + '-timing-function', property, configuration);
+ var delay = _wrapDefault(property.name + '-delay', property, configuration);
+ var iteration = _wrapDefault(property.name + '-iteration-count', property, configuration);
+ var direction = _wrapDefault(property.name + '-direction', property, configuration);
+ var fill = _wrapDefault(property.name + '-fill-mode', property, configuration);
+ var play = _wrapDefault(property.name + '-play-state', property, configuration);
+ var name = _wrapDefault(property.name + '-name', property, configuration);
+ var components = [duration, timing, delay, iteration, direction, fill, play, name];
+ var values = property.value;
+ var value;
+ var durationSet = false;
+ var timingSet = false;
+ var delaySet = false;
+ var iterationSet = false;
+ var directionSet = false;
+ var fillSet = false;
+ var playSet = false;
+ var nameSet = false;
+ var i;
+ var l;
+
+ if (property.value.length == 1 && property.value[0][1] == 'inherit') {
+ duration.value = timing.value = delay.value = iteration.value = direction.value = fill.value = play.value = name.value = property.value;
+ return components;
+ }
+
+ if (values.length > 1 && _anyIsInherit(values)) {
+ throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ for (i = 0, l = values.length; i < l; i++) {
+ value = values[i];
+
+ if (validator.isTime(value[1]) && !durationSet) {
+ duration.value = [value];
+ durationSet = true;
+ } else if (validator.isTime(value[1]) && !delaySet) {
+ delay.value = [value];
+ delaySet = true;
+ } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {
+ timing.value = [value];
+ timingSet = true;
+ } else if ((validator.isAnimationIterationCountKeyword(value[1]) || validator.isPositiveNumber(value[1])) && !iterationSet) {
+ iteration.value = [value];
+ iterationSet = true;
+ } else if (validator.isAnimationDirectionKeyword(value[1]) && !directionSet) {
+ direction.value = [value];
+ directionSet = true;
+ } else if (validator.isAnimationFillModeKeyword(value[1]) && !fillSet) {
+ fill.value = [value];
+ fillSet = true;
+ } else if (validator.isAnimationPlayStateKeyword(value[1]) && !playSet) {
+ play.value = [value];
+ playSet = true;
+ } else if ((validator.isAnimationNameKeyword(value[1]) || validator.isIdentifier(value[1])) && !nameSet) {
+ name.value = [value];
+ nameSet = true;
+ } else {
+ throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');
+ }
+ }
+
+ return components;
+}
+
+function background(property, configuration, validator) {
+ var image = _wrapDefault('background-image', property, configuration);
+ var position = _wrapDefault('background-position', property, configuration);
+ var size = _wrapDefault('background-size', property, configuration);
+ var repeat = _wrapDefault('background-repeat', property, configuration);
+ var attachment = _wrapDefault('background-attachment', property, configuration);
+ var origin = _wrapDefault('background-origin', property, configuration);
+ var clip = _wrapDefault('background-clip', property, configuration);
+ var color = _wrapDefault('background-color', property, configuration);
+ var components = [image, position, size, repeat, attachment, origin, clip, color];
+ var values = property.value;
+
+ var positionSet = false;
+ var clipSet = false;
+ var originSet = false;
+ var repeatSet = false;
+
+ var anyValueSet = false;
+
+ if (property.value.length == 1 && property.value[0][1] == 'inherit') {
+ // NOTE: 'inherit' is not a valid value for background-attachment
+ color.value = image.value = repeat.value = position.value = size.value = origin.value = clip.value = property.value;
+ return components;
+ }
+
+ if (property.value.length == 1 && property.value[0][1] == '0 0') {
+ return components;
+ }
+
+ for (var i = values.length - 1; i >= 0; i--) {
+ var value = values[i];
+
+ if (validator.isBackgroundAttachmentKeyword(value[1])) {
+ attachment.value = [value];
+ anyValueSet = true;
+ } else if (validator.isBackgroundClipKeyword(value[1]) || validator.isBackgroundOriginKeyword(value[1])) {
+ if (clipSet) {
+ origin.value = [value];
+ originSet = true;
+ } else {
+ clip.value = [value];
+ clipSet = true;
+ }
+ anyValueSet = true;
+ } else if (validator.isBackgroundRepeatKeyword(value[1])) {
+ if (repeatSet) {
+ repeat.value.unshift(value);
+ } else {
+ repeat.value = [value];
+ repeatSet = true;
+ }
+ anyValueSet = true;
+ } else if (validator.isBackgroundPositionKeyword(value[1]) || validator.isBackgroundSizeKeyword(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) {
+ if (i > 0) {
+ var previousValue = values[i - 1];
+
+ if (previousValue[1] == Marker.FORWARD_SLASH) {
+ size.value = [value];
+ } else if (i > 1 && values[i - 2][1] == Marker.FORWARD_SLASH) {
+ size.value = [previousValue, value];
+ i -= 2;
+ } else {
+ if (!positionSet)
+ position.value = [];
+
+ position.value.unshift(value);
+ positionSet = true;
+ }
+ } else {
+ if (!positionSet)
+ position.value = [];
+
+ position.value.unshift(value);
+ positionSet = true;
+ }
+ anyValueSet = true;
+ } else if ((color.value[0][1] == configuration[color.name].defaultValue || color.value[0][1] == 'none') && (validator.isColor(value[1]) || validator.isPrefixed(value[1]))) {
+ color.value = [value];
+ anyValueSet = true;
+ } else if (validator.isUrl(value[1]) || validator.isFunction(value[1])) {
+ image.value = [value];
+ anyValueSet = true;
+ }
+ }
+
+ if (clipSet && !originSet)
+ origin.value = clip.value.slice(0);
+
+ if (!anyValueSet) {
+ throw new InvalidPropertyError('Invalid background value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ return components;
+}
+
+function borderRadius(property, configuration) {
+ var values = property.value;
+ var splitAt = -1;
+
+ for (var i = 0, l = values.length; i < l; i++) {
+ if (values[i][1] == Marker.FORWARD_SLASH) {
+ splitAt = i;
+ break;
+ }
+ }
+
+ if (splitAt === 0 || splitAt === values.length - 1) {
+ throw new InvalidPropertyError('Invalid border-radius value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ var target = _wrapDefault(property.name, property, configuration);
+ target.value = splitAt > -1 ?
+ values.slice(0, splitAt) :
+ values.slice(0);
+ target.components = fourValues(target, configuration);
+
+ var remainder = _wrapDefault(property.name, property, configuration);
+ remainder.value = splitAt > -1 ?
+ values.slice(splitAt + 1) :
+ values.slice(0);
+ remainder.components = fourValues(remainder, configuration);
+
+ for (var j = 0; j < 4; j++) {
+ target.components[j].multiplex = true;
+ target.components[j].value = target.components[j].value.concat(remainder.components[j].value);
+ }
+
+ return target.components;
+}
+
+function font(property, configuration, validator) {
+ var style = _wrapDefault('font-style', property, configuration);
+ var variant = _wrapDefault('font-variant', property, configuration);
+ var weight = _wrapDefault('font-weight', property, configuration);
+ var stretch = _wrapDefault('font-stretch', property, configuration);
+ var size = _wrapDefault('font-size', property, configuration);
+ var height = _wrapDefault('line-height', property, configuration);
+ var family = _wrapDefault('font-family', property, configuration);
+ var components = [style, variant, weight, stretch, size, height, family];
+ var values = property.value;
+ var fuzzyMatched = 4; // style, variant, weight, and stretch
+ var index = 0;
+ var isStretchSet = false;
+ var isStretchValid;
+ var isStyleSet = false;
+ var isStyleValid;
+ var isVariantSet = false;
+ var isVariantValid;
+ var isWeightSet = false;
+ var isWeightValid;
+ var isSizeSet = false;
+ var appendableFamilyName = false;
+
+ if (!values[index]) {
+ throw new InvalidPropertyError('Missing font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');
+ }
+
+ if (values.length == 1 && values[0][1] == 'inherit') {
+ style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;
+ return components;
+ }
+
+ if (values.length == 1 && (validator.isFontKeyword(values[0][1]) || validator.isGlobal(values[0][1]) || validator.isPrefixed(values[0][1]))) {
+ values[0][1] = Marker.INTERNAL + values[0][1];
+ style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;
+ return components;
+ }
+
+ if (values.length < 2 || !_anyIsFontSize(values, validator) || !_anyIsFontFamily(values, validator)) {
+ throw new InvalidPropertyError('Invalid font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');
+ }
+
+ if (values.length > 1 && _anyIsInherit(values)) {
+ throw new InvalidPropertyError('Invalid font values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ // fuzzy match style, variant, weight, and stretch on first elements
+ while (index < fuzzyMatched) {
+ isStretchValid = validator.isFontStretchKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
+ isStyleValid = validator.isFontStyleKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
+ isVariantValid = validator.isFontVariantKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
+ isWeightValid = validator.isFontWeightKeyword(values[index][1]) || validator.isGlobal(values[index][1]);
+
+ if (isStyleValid && !isStyleSet) {
+ style.value = [values[index]];
+ isStyleSet = true;
+ } else if (isVariantValid && !isVariantSet) {
+ variant.value = [values[index]];
+ isVariantSet = true;
+ } else if (isWeightValid && !isWeightSet) {
+ weight.value = [values[index]];
+ isWeightSet = true;
+ } else if (isStretchValid && !isStretchSet) {
+ stretch.value = [values[index]];
+ isStretchSet = true;
+ } else if (isStyleValid && isStyleSet || isVariantValid && isVariantSet || isWeightValid && isWeightSet || isStretchValid && isStretchSet) {
+ throw new InvalidPropertyError('Invalid font style / variant / weight / stretch value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ } else {
+ break;
+ }
+
+ index++;
+ }
+
+ // now comes font-size ...
+ if (validator.isFontSizeKeyword(values[index][1]) || validator.isUnit(values[index][1]) && !validator.isDynamicUnit(values[index][1])) {
+ size.value = [values[index]];
+ isSizeSet = true;
+ index++;
+ } else {
+ throw new InvalidPropertyError('Missing font size at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ if (!values[index]) {
+ throw new InvalidPropertyError('Missing font family at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ // ... and perhaps line-height
+ if (isSizeSet && values[index] && values[index][1] == Marker.FORWARD_SLASH && values[index + 1] && (validator.isLineHeightKeyword(values[index + 1][1]) || validator.isUnit(values[index + 1][1]) || validator.isNumber(values[index + 1][1]))) {
+ height.value = [values[index + 1]];
+ index++;
+ index++;
+ }
+
+ // ... and whatever comes next is font-family
+ family.value = [];
+
+ while (values[index]) {
+ if (values[index][1] == Marker.COMMA) {
+ appendableFamilyName = false;
+ } else {
+ if (appendableFamilyName) {
+ family.value[family.value.length - 1][1] += Marker.SPACE + values[index][1];
+ } else {
+ family.value.push(values[index]);
+ }
+
+ appendableFamilyName = true;
+ }
+
+ index++;
+ }
+
+ if (family.value.length === 0) {
+ throw new InvalidPropertyError('Missing font family at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ return components;
+}
+
+function _anyIsFontSize(values, validator) {
+ var value;
+ var i, l;
+
+ for (i = 0, l = values.length; i < l; i++) {
+ value = values[i];
+
+ if (validator.isFontSizeKeyword(value[1]) || validator.isUnit(value[1]) && !validator.isDynamicUnit(value[1]) || validator.isFunction(value[1])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function _anyIsFontFamily(values, validator) {
+ var value;
+ var i, l;
+
+ for (i = 0, l = values.length; i < l; i++) {
+ value = values[i];
+
+ if (validator.isIdentifier(value[1]) || validator.isQuotedText(value[1])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function fourValues(property, configuration) {
+ var componentNames = configuration[property.name].components;
+ var components = [];
+ var value = property.value;
+
+ if (value.length < 1)
+ return [];
+
+ if (value.length < 2)
+ value[1] = value[0].slice(0);
+ if (value.length < 3)
+ value[2] = value[0].slice(0);
+ if (value.length < 4)
+ value[3] = value[1].slice(0);
+
+ for (var i = componentNames.length - 1; i >= 0; i--) {
+ var component = wrapSingle([
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, componentNames[i]]
+ ]);
+ component.value = [value[i]];
+ components.unshift(component);
+ }
+
+ return components;
+}
+
+function multiplex(splitWith) {
+ return function (property, configuration, validator) {
+ var splitsAt = [];
+ var values = property.value;
+ var i, j, l, m;
+
+ // find split commas
+ for (i = 0, l = values.length; i < l; i++) {
+ if (values[i][1] == ',')
+ splitsAt.push(i);
+ }
+
+ if (splitsAt.length === 0)
+ return splitWith(property, configuration, validator);
+
+ var splitComponents = [];
+
+ // split over commas, and into components
+ for (i = 0, l = splitsAt.length; i <= l; i++) {
+ var from = i === 0 ? 0 : splitsAt[i - 1] + 1;
+ var to = i < l ? splitsAt[i] : values.length;
+
+ var _property = _wrapDefault(property.name, property, configuration);
+ _property.value = values.slice(from, to);
+
+ if (_property.value.length > 0) {
+ splitComponents.push(splitWith(_property, configuration, validator));
+ }
+ }
+
+ var components = splitComponents[0];
+
+ // group component values from each split
+ for (i = 0, l = components.length; i < l; i++) {
+ components[i].multiplex = true;
+
+ for (j = 1, m = splitComponents.length; j < m; j++) {
+ components[i].value.push([Token.PROPERTY_VALUE, Marker.COMMA]);
+ Array.prototype.push.apply(components[i].value, splitComponents[j][i].value);
+ }
+ }
+
+ return components;
+ };
+}
+
+function listStyle(property, configuration, validator) {
+ var type = _wrapDefault('list-style-type', property, configuration);
+ var position = _wrapDefault('list-style-position', property, configuration);
+ var image = _wrapDefault('list-style-image', property, configuration);
+ var components = [type, position, image];
+
+ if (property.value.length == 1 && property.value[0][1] == 'inherit') {
+ type.value = position.value = image.value = [property.value[0]];
+ return components;
+ }
+
+ var values = property.value.slice(0);
+ var total = values.length;
+ var index = 0;
+
+ // `image` first...
+ for (index = 0, total = values.length; index < total; index++) {
+ if (validator.isUrl(values[index][1]) || values[index][1] == '0') {
+ image.value = [values[index]];
+ values.splice(index, 1);
+ break;
+ }
+ }
+
+ // ... then `position`
+ for (index = 0, total = values.length; index < total; index++) {
+ if (validator.isListStylePositionKeyword(values[index][1])) {
+ position.value = [values[index]];
+ values.splice(index, 1);
+ break;
+ }
+ }
+
+ // ... and what's left is a `type`
+ if (values.length > 0 && (validator.isListStyleTypeKeyword(values[0][1]) || validator.isIdentifier(values[0][1]))) {
+ type.value = [values[0]];
+ }
+
+ return components;
+}
+
+function transition(property, configuration, validator) {
+ var prop = _wrapDefault(property.name + '-property', property, configuration);
+ var duration = _wrapDefault(property.name + '-duration', property, configuration);
+ var timing = _wrapDefault(property.name + '-timing-function', property, configuration);
+ var delay = _wrapDefault(property.name + '-delay', property, configuration);
+ var components = [prop, duration, timing, delay];
+ var values = property.value;
+ var value;
+ var durationSet = false;
+ var delaySet = false;
+ var propSet = false;
+ var timingSet = false;
+ var i;
+ var l;
+
+ if (property.value.length == 1 && property.value[0][1] == 'inherit') {
+ prop.value = duration.value = timing.value = delay.value = property.value;
+ return components;
+ }
+
+ if (values.length > 1 && _anyIsInherit(values)) {
+ throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');
+ }
+
+ for (i = 0, l = values.length; i < l; i++) {
+ value = values[i];
+
+ if (validator.isTime(value[1]) && !durationSet) {
+ duration.value = [value];
+ durationSet = true;
+ } else if (validator.isTime(value[1]) && !delaySet) {
+ delay.value = [value];
+ delaySet = true;
+ } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {
+ timing.value = [value];
+ timingSet = true;
+ } else if (validator.isIdentifier(value[1]) && !propSet) {
+ prop.value = [value];
+ propSet = true;
+ } else {
+ throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');
+ }
+ }
+
+ return components;
+}
+
+function widthStyleColor(property, configuration, validator) {
+ var descriptor = configuration[property.name];
+ var components = [
+ _wrapDefault(descriptor.components[0], property, configuration),
+ _wrapDefault(descriptor.components[1], property, configuration),
+ _wrapDefault(descriptor.components[2], property, configuration)
+ ];
+ var color, style, width;
+
+ for (var i = 0; i < 3; i++) {
+ var component = components[i];
+
+ if (component.name.indexOf('color') > 0)
+ color = component;
+ else if (component.name.indexOf('style') > 0)
+ style = component;
+ else
+ width = component;
+ }
+
+ if ((property.value.length == 1 && property.value[0][1] == 'inherit') ||
+ (property.value.length == 3 && property.value[0][1] == 'inherit' && property.value[1][1] == 'inherit' && property.value[2][1] == 'inherit')) {
+ color.value = style.value = width.value = [property.value[0]];
+ return components;
+ }
+
+ var values = property.value.slice(0);
+ var match, matches;
+
+ // NOTE: usually users don't follow the required order of parts in this shorthand,
+ // so we'll try to parse it caring as little about order as possible
+
+ if (values.length > 0) {
+ matches = values.filter(_widthFilter(validator));
+ match = matches.length > 1 && (matches[0][1] == 'none' || matches[0][1] == 'auto') ? matches[1] : matches[0];
+ if (match) {
+ width.value = [match];
+ values.splice(values.indexOf(match), 1);
+ }
+ }
+
+ if (values.length > 0) {
+ match = values.filter(_styleFilter(validator))[0];
+ if (match) {
+ style.value = [match];
+ values.splice(values.indexOf(match), 1);
+ }
+ }
+
+ if (values.length > 0) {
+ match = values.filter(_colorFilter(validator))[0];
+ if (match) {
+ color.value = [match];
+ values.splice(values.indexOf(match), 1);
+ }
+ }
+
+ return components;
+}
+
+module.exports = {
+ animation: animation,
+ background: background,
+ border: widthStyleColor,
+ borderRadius: borderRadius,
+ font: font,
+ fourValues: fourValues,
+ listStyle: listStyle,
+ multiplex: multiplex,
+ outline: widthStyleColor,
+ transition: transition
+};
+
+
+/***/ }),
+
+/***/ 7735:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var understandable = __webpack_require__(7240);
+
+function animationIterationCount(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2);
+}
+
+function animationName(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2);
+}
+
+function areSameFunction(validator, value1, value2) {
+ if (!validator.isFunction(value1) || !validator.isFunction(value2)) {
+ return false;
+ }
+
+ var function1Name = value1.substring(0, value1.indexOf('('));
+ var function2Name = value2.substring(0, value2.indexOf('('));
+
+ var function1Value = value1.substring(function1Name.length + 1, value1.length - 1);
+ var function2Value = value2.substring(function2Name.length + 1, value2.length - 1);
+
+ if (validator.isFunction(function1Value) || validator.isFunction(function2Value)) {
+ return function1Name === function2Name && areSameFunction(validator, function1Value, function2Value);
+ } else {
+ return function1Name === function2Name;
+ }
+}
+
+function backgroundPosition(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ } else if (validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2)) {
+ return true;
+ }
+
+ return unit(validator, value1, value2);
+}
+
+function backgroundSize(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ } else if (validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2)) {
+ return true;
+ }
+
+ return unit(validator, value1, value2);
+}
+
+function color(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !validator.isColor(value2)) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ } else if (!validator.colorOpacity && (validator.isRgbColor(value1) || validator.isHslColor(value1))) {
+ return false;
+ } else if (!validator.colorOpacity && (validator.isRgbColor(value2) || validator.isHslColor(value2))) {
+ return false;
+ } else if (!validator.colorHexAlpha && (validator.isHexAlphaColor(value1) || validator.isHexAlphaColor(value2))) {
+ return false;
+ } else if (validator.isColor(value1) && validator.isColor(value2)) {
+ return true;
+ }
+
+ return sameFunctionOrValue(validator, value1, value2);
+}
+
+function components(overrideCheckers) {
+ return function (validator, value1, value2, position) {
+ return overrideCheckers[position](validator, value1, value2);
+ };
+}
+
+function fontFamily(validator, value1, value2) {
+ return understandable(validator, value1, value2, 0, true);
+}
+
+function image(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !validator.isImage(value2)) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ } else if (validator.isImage(value2)) {
+ return true;
+ } else if (validator.isImage(value1)) {
+ return false;
+ }
+
+ return sameFunctionOrValue(validator, value1, value2);
+}
+
+function keyword(propertyName) {
+ return function(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !validator.isKeyword(propertyName)(value2)) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isKeyword(propertyName)(value2);
+ };
+}
+
+function keywordWithGlobal(propertyName) {
+ return function(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isKeyword(propertyName)(value2) || validator.isGlobal(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isKeyword(propertyName)(value2) || validator.isGlobal(value2);
+ };
+}
+
+function propertyName(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !validator.isIdentifier(value2)) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isIdentifier(value2);
+}
+
+function sameFunctionOrValue(validator, value1, value2) {
+ return areSameFunction(validator, value1, value2) ?
+ true :
+ value1 === value2;
+}
+
+function textShadow(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2);
+}
+
+function time(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !validator.isTime(value2)) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ } else if (validator.isTime(value1) && !validator.isTime(value2)) {
+ return false;
+ } else if (validator.isTime(value2)) {
+ return true;
+ } else if (validator.isTime(value1)) {
+ return false;
+ } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {
+ return true;
+ }
+
+ return sameFunctionOrValue(validator, value1, value2);
+}
+
+function timingFunction(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isTimingFunction(value2) || validator.isGlobal(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isTimingFunction(value2) || validator.isGlobal(value2);
+}
+
+function unit(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !validator.isUnit(value2)) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ } else if (validator.isUnit(value1) && !validator.isUnit(value2)) {
+ return false;
+ } else if (validator.isUnit(value2)) {
+ return true;
+ } else if (validator.isUnit(value1)) {
+ return false;
+ } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {
+ return true;
+ }
+
+ return sameFunctionOrValue(validator, value1, value2);
+}
+
+function unitOrKeywordWithGlobal(propertyName) {
+ var byKeyword = keywordWithGlobal(propertyName);
+
+ return function(validator, value1, value2) {
+ return unit(validator, value1, value2) || byKeyword(validator, value1, value2);
+ };
+}
+
+function unitOrNumber(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isNumber(value2))) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ } else if ((validator.isUnit(value1) || validator.isNumber(value1)) && !(validator.isUnit(value2) || validator.isNumber(value2))) {
+ return false;
+ } else if (validator.isUnit(value2) || validator.isNumber(value2)) {
+ return true;
+ } else if (validator.isUnit(value1) || validator.isNumber(value1)) {
+ return false;
+ } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {
+ return true;
+ }
+
+ return sameFunctionOrValue(validator, value1, value2);
+}
+
+function zIndex(validator, value1, value2) {
+ if (!understandable(validator, value1, value2, 0, true) && !validator.isZIndex(value2)) {
+ return false;
+ } else if (validator.isVariable(value1) && validator.isVariable(value2)) {
+ return true;
+ }
+
+ return validator.isZIndex(value2);
+}
+
+module.exports = {
+ generic: {
+ color: color,
+ components: components,
+ image: image,
+ propertyName: propertyName,
+ time: time,
+ timingFunction: timingFunction,
+ unit: unit,
+ unitOrNumber: unitOrNumber
+ },
+ property: {
+ animationDirection: keywordWithGlobal('animation-direction'),
+ animationFillMode: keyword('animation-fill-mode'),
+ animationIterationCount: animationIterationCount,
+ animationName: animationName,
+ animationPlayState: keywordWithGlobal('animation-play-state'),
+ backgroundAttachment: keyword('background-attachment'),
+ backgroundClip: keywordWithGlobal('background-clip'),
+ backgroundOrigin: keyword('background-origin'),
+ backgroundPosition: backgroundPosition,
+ backgroundRepeat: keyword('background-repeat'),
+ backgroundSize: backgroundSize,
+ bottom: unitOrKeywordWithGlobal('bottom'),
+ borderCollapse: keyword('border-collapse'),
+ borderStyle: keywordWithGlobal('*-style'),
+ clear: keywordWithGlobal('clear'),
+ cursor: keywordWithGlobal('cursor'),
+ display: keywordWithGlobal('display'),
+ float: keywordWithGlobal('float'),
+ left: unitOrKeywordWithGlobal('left'),
+ fontFamily: fontFamily,
+ fontStretch: keywordWithGlobal('font-stretch'),
+ fontStyle: keywordWithGlobal('font-style'),
+ fontVariant: keywordWithGlobal('font-variant'),
+ fontWeight: keywordWithGlobal('font-weight'),
+ listStyleType: keywordWithGlobal('list-style-type'),
+ listStylePosition: keywordWithGlobal('list-style-position'),
+ outlineStyle: keywordWithGlobal('*-style'),
+ overflow: keywordWithGlobal('overflow'),
+ position: keywordWithGlobal('position'),
+ right: unitOrKeywordWithGlobal('right'),
+ textAlign: keywordWithGlobal('text-align'),
+ textDecoration: keywordWithGlobal('text-decoration'),
+ textOverflow: keywordWithGlobal('text-overflow'),
+ textShadow: textShadow,
+ top: unitOrKeywordWithGlobal('top'),
+ transform: sameFunctionOrValue,
+ verticalAlign: unitOrKeywordWithGlobal('vertical-align'),
+ visibility: keywordWithGlobal('visibility'),
+ whiteSpace: keywordWithGlobal('white-space'),
+ zIndex: zIndex
+ }
+};
+
+
+/***/ }),
+
+/***/ 7240:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var sameVendorPrefixes = __webpack_require__(3568).same;
+
+function understandable(validator, value1, value2, _position, isPaired) {
+ if (!sameVendorPrefixes(value1, value2)) {
+ return false;
+ }
+
+ if (isPaired && validator.isVariable(value1) !== validator.isVariable(value2)) {
+ return false;
+ }
+
+ return true;
+}
+
+module.exports = understandable;
+
+
+/***/ }),
+
+/***/ 6046:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var shallowClone = __webpack_require__(2079).shallow;
+
+var Token = __webpack_require__(7298);
+var Marker = __webpack_require__(2638);
+
+function isInheritOnly(values) {
+ for (var i = 0, l = values.length; i < l; i++) {
+ var value = values[i][1];
+
+ if (value != 'inherit' && value != Marker.COMMA && value != Marker.FORWARD_SLASH)
+ return false;
+ }
+
+ return true;
+}
+
+function background(property, configuration, lastInMultiplex) {
+ var components = property.components;
+ var restored = [];
+ var needsOne, needsBoth;
+
+ function restoreValue(component) {
+ Array.prototype.unshift.apply(restored, component.value);
+ }
+
+ function isDefaultValue(component) {
+ var descriptor = configuration[component.name];
+
+ if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {
+ return component.value[0][1] == descriptor.defaultValue[0] && (component.value[1] ? component.value[1][1] == descriptor.defaultValue[0] : true);
+ } else if (descriptor.doubleValues && descriptor.defaultValue.length != 1) {
+ return component.value[0][1] == descriptor.defaultValue[0] && (component.value[1] ? component.value[1][1] : component.value[0][1]) == descriptor.defaultValue[1];
+ } else {
+ return component.value[0][1] == descriptor.defaultValue;
+ }
+ }
+
+ for (var i = components.length - 1; i >= 0; i--) {
+ var component = components[i];
+ var isDefault = isDefaultValue(component);
+
+ if (component.name == 'background-clip') {
+ var originComponent = components[i - 1];
+ var isOriginDefault = isDefaultValue(originComponent);
+
+ needsOne = component.value[0][1] == originComponent.value[0][1];
+
+ needsBoth = !needsOne && (
+ (isOriginDefault && !isDefault) ||
+ (!isOriginDefault && !isDefault) ||
+ (!isOriginDefault && isDefault && component.value[0][1] != originComponent.value[0][1]));
+
+ if (needsOne) {
+ restoreValue(originComponent);
+ } else if (needsBoth) {
+ restoreValue(component);
+ restoreValue(originComponent);
+ }
+
+ i--;
+ } else if (component.name == 'background-size') {
+ var positionComponent = components[i - 1];
+ var isPositionDefault = isDefaultValue(positionComponent);
+
+ needsOne = !isPositionDefault && isDefault;
+
+ needsBoth = !needsOne &&
+ (isPositionDefault && !isDefault || !isPositionDefault && !isDefault);
+
+ if (needsOne) {
+ restoreValue(positionComponent);
+ } else if (needsBoth) {
+ restoreValue(component);
+ restored.unshift([Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]);
+ restoreValue(positionComponent);
+ } else if (positionComponent.value.length == 1) {
+ restoreValue(positionComponent);
+ }
+
+ i--;
+ } else {
+ if (isDefault || configuration[component.name].multiplexLastOnly && !lastInMultiplex)
+ continue;
+
+ restoreValue(component);
+ }
+ }
+
+ if (restored.length === 0 && property.value.length == 1 && property.value[0][1] == '0')
+ restored.push(property.value[0]);
+
+ if (restored.length === 0)
+ restored.push([Token.PROPERTY_VALUE, configuration[property.name].defaultValue]);
+
+ if (isInheritOnly(restored))
+ return [restored[0]];
+
+ return restored;
+}
+
+function borderRadius(property, configuration) {
+ if (property.multiplex) {
+ var horizontal = shallowClone(property);
+ var vertical = shallowClone(property);
+
+ for (var i = 0; i < 4; i++) {
+ var component = property.components[i];
+
+ var horizontalComponent = shallowClone(property);
+ horizontalComponent.value = [component.value[0]];
+ horizontal.components.push(horizontalComponent);
+
+ var verticalComponent = shallowClone(property);
+ // FIXME: only shorthand compactor (see breakup#borderRadius) knows that border radius
+ // longhands have two values, whereas tokenizer does not care about populating 2nd value
+ // if it's missing, hence this fallback
+ verticalComponent.value = [component.value[1] || component.value[0]];
+ vertical.components.push(verticalComponent);
+ }
+
+ var horizontalValues = fourValues(horizontal, configuration);
+ var verticalValues = fourValues(vertical, configuration);
+
+ if (horizontalValues.length == verticalValues.length &&
+ horizontalValues[0][1] == verticalValues[0][1] &&
+ (horizontalValues.length > 1 ? horizontalValues[1][1] == verticalValues[1][1] : true) &&
+ (horizontalValues.length > 2 ? horizontalValues[2][1] == verticalValues[2][1] : true) &&
+ (horizontalValues.length > 3 ? horizontalValues[3][1] == verticalValues[3][1] : true)) {
+ return horizontalValues;
+ } else {
+ return horizontalValues.concat([[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]).concat(verticalValues);
+ }
+ } else {
+ return fourValues(property, configuration);
+ }
+}
+
+function font(property, configuration) {
+ var components = property.components;
+ var restored = [];
+ var component;
+ var componentIndex = 0;
+ var fontFamilyIndex = 0;
+
+ if (property.value[0][1].indexOf(Marker.INTERNAL) === 0) {
+ property.value[0][1] = property.value[0][1].substring(Marker.INTERNAL.length);
+ return property.value;
+ }
+
+ // first four components are optional
+ while (componentIndex < 4) {
+ component = components[componentIndex];
+
+ if (component.value[0][1] != configuration[component.name].defaultValue) {
+ Array.prototype.push.apply(restored, component.value);
+ }
+
+ componentIndex++;
+ }
+
+ // then comes font-size
+ Array.prototype.push.apply(restored, components[componentIndex].value);
+ componentIndex++;
+
+ // then may come line-height
+ if (components[componentIndex].value[0][1] != configuration[components[componentIndex].name].defaultValue) {
+ Array.prototype.push.apply(restored, [[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]);
+ Array.prototype.push.apply(restored, components[componentIndex].value);
+ }
+
+ componentIndex++;
+
+ // then comes font-family
+ while (components[componentIndex].value[fontFamilyIndex]) {
+ restored.push(components[componentIndex].value[fontFamilyIndex]);
+
+ if (components[componentIndex].value[fontFamilyIndex + 1]) {
+ restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);
+ }
+
+ fontFamilyIndex++;
+ }
+
+ if (isInheritOnly(restored)) {
+ return [restored[0]];
+ }
+
+ return restored;
+}
+
+function fourValues(property) {
+ var components = property.components;
+ var value1 = components[0].value[0];
+ var value2 = components[1].value[0];
+ var value3 = components[2].value[0];
+ var value4 = components[3].value[0];
+
+ if (value1[1] == value2[1] && value1[1] == value3[1] && value1[1] == value4[1]) {
+ return [value1];
+ } else if (value1[1] == value3[1] && value2[1] == value4[1]) {
+ return [value1, value2];
+ } else if (value2[1] == value4[1]) {
+ return [value1, value2, value3];
+ } else {
+ return [value1, value2, value3, value4];
+ }
+}
+
+function multiplex(restoreWith) {
+ return function (property, configuration) {
+ if (!property.multiplex)
+ return restoreWith(property, configuration, true);
+
+ var multiplexSize = 0;
+ var restored = [];
+ var componentMultiplexSoFar = {};
+ var i, l;
+
+ // At this point we don't know what's the multiplex size, e.g. how many background layers are there
+ for (i = 0, l = property.components[0].value.length; i < l; i++) {
+ if (property.components[0].value[i][1] == Marker.COMMA)
+ multiplexSize++;
+ }
+
+ for (i = 0; i <= multiplexSize; i++) {
+ var _property = shallowClone(property);
+
+ // We split multiplex into parts and restore them one by one
+ for (var j = 0, m = property.components.length; j < m; j++) {
+ var componentToClone = property.components[j];
+ var _component = shallowClone(componentToClone);
+ _property.components.push(_component);
+
+ // The trick is some properties has more than one value, so we iterate over values looking for
+ // a multiplex separator - a comma
+ for (var k = componentMultiplexSoFar[_component.name] || 0, n = componentToClone.value.length; k < n; k++) {
+ if (componentToClone.value[k][1] == Marker.COMMA) {
+ componentMultiplexSoFar[_component.name] = k + 1;
+ break;
+ }
+
+ _component.value.push(componentToClone.value[k]);
+ }
+ }
+
+ // No we can restore shorthand value
+ var lastInMultiplex = i == multiplexSize;
+ var _restored = restoreWith(_property, configuration, lastInMultiplex);
+ Array.prototype.push.apply(restored, _restored);
+
+ if (i < multiplexSize)
+ restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);
+ }
+
+ return restored;
+ };
+}
+
+function withoutDefaults(property, configuration) {
+ var components = property.components;
+ var restored = [];
+
+ for (var i = components.length - 1; i >= 0; i--) {
+ var component = components[i];
+ var descriptor = configuration[component.name];
+
+ if (component.value[0][1] != descriptor.defaultValue || ('keepUnlessDefault' in descriptor) && !isDefault(components, configuration, descriptor.keepUnlessDefault)) {
+ restored.unshift(component.value[0]);
+ }
+ }
+
+ if (restored.length === 0)
+ restored.push([Token.PROPERTY_VALUE, configuration[property.name].defaultValue]);
+
+ if (isInheritOnly(restored))
+ return [restored[0]];
+
+ return restored;
+}
+
+function isDefault(components, configuration, propertyName) {
+ var component;
+ var i, l;
+
+ for (i = 0, l = components.length; i < l; i++) {
+ component = components[i];
+
+ if (component.name == propertyName && component.value[0][1] == configuration[propertyName].defaultValue) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+module.exports = {
+ background: background,
+ borderRadius: borderRadius,
+ font: font,
+ fourValues: fourValues,
+ multiplex: multiplex,
+ withoutDefaults: withoutDefaults
+};
+
+
+/***/ }),
+
+/***/ 1084:
+/***/ ((module) => {
+
+var Hack = {
+ ASTERISK: 'asterisk',
+ BANG: 'bang',
+ BACKSLASH: 'backslash',
+ UNDERSCORE: 'underscore'
+};
+
+module.exports = Hack;
+
+
+/***/ }),
+
+/***/ 406:
+/***/ ((module) => {
+
+function InvalidPropertyError(message) {
+ this.name = 'InvalidPropertyError';
+ this.message = message;
+ this.stack = (new Error()).stack;
+}
+
+InvalidPropertyError.prototype = Object.create(Error.prototype);
+InvalidPropertyError.prototype.constructor = InvalidPropertyError;
+
+module.exports = InvalidPropertyError;
+
+
+/***/ }),
+
+/***/ 3970:
+/***/ ((module) => {
+
+function level0Optimize(tokens) {
+ // noop as level 0 means no optimizations!
+ return tokens;
+}
+
+module.exports = level0Optimize;
+
+
+/***/ }),
+
+/***/ 8018:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var sortSelectors = __webpack_require__(4290);
+var tidyRules = __webpack_require__(2569);
+var tidyBlock = __webpack_require__(8363);
+var tidyAtRule = __webpack_require__(9534);
+
+var Hack = __webpack_require__(1084);
+var removeUnused = __webpack_require__(142);
+var restoreFromOptimizing = __webpack_require__(4168);
+var wrapForOptimizing = __webpack_require__(4082).all;
+
+var configuration = __webpack_require__(2341);
+var optimizers = __webpack_require__(2039);
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var Token = __webpack_require__(7298);
+var Marker = __webpack_require__(2638);
+
+var formatPosition = __webpack_require__(7270);
+
+var serializeRules = __webpack_require__(5327).rules;
+
+var CHARSET_TOKEN = '@charset';
+var CHARSET_REGEXP = new RegExp('^' + CHARSET_TOKEN, 'i');
+
+var DEFAULT_ROUNDING_PRECISION = __webpack_require__(6241).DEFAULT;
+
+var PROPERTY_NAME_PATTERN = /^(?:\-chrome\-|\-[\w\-]+\w|\w[\w\-]+\w|\w{1,}|\-\-\S+)$/;
+var IMPORT_PREFIX_PATTERN = /^@import/i;
+var URL_PREFIX_PATTERN = /^url\(/i;
+var VARIABLE_NAME_PATTERN = /^--\S+$/;
+
+function startsAsUrl(value) {
+ return URL_PREFIX_PATTERN.test(value);
+}
+
+function isImport(token) {
+ return IMPORT_PREFIX_PATTERN.test(token[1]);
+}
+
+function isLegacyFilter(property) {
+ var value;
+
+ if (property.name == 'filter' || property.name == '-ms-filter') {
+ value = property.value[0][1];
+
+ return value.indexOf('progid') > -1 ||
+ value.indexOf('alpha') === 0 ||
+ value.indexOf('chroma') === 0;
+ } else {
+ return false;
+ }
+}
+
+function noop() {}
+
+function optimizeBody(rule, properties, context) {
+ var options = context.options;
+ var valueOptimizers;
+ var property, name, type, value;
+ var propertyToken;
+ var propertyOptimizer;
+ var serializedRule = serializeRules(rule);
+ var _properties = wrapForOptimizing(properties);
+ var pluginValueOptimizers = context.options.plugins.level1Value;
+ var pluginPropertyOptimizers = context.options.plugins.level1Property;
+ var i, l;
+
+ propertyLoop:
+ for (i = 0, l = _properties.length; i < l; i++) {
+ var j, k, m, n;
+
+ property = _properties[i];
+ name = property.name;
+ propertyOptimizer = configuration[name] && configuration[name].propertyOptimizer || noop;
+ valueOptimizers = configuration[name] && configuration[name].valueOptimizers || [optimizers.whiteSpace];
+
+ if (!PROPERTY_NAME_PATTERN.test(name)) {
+ propertyToken = property.all[property.position];
+ context.warnings.push('Invalid property name \'' + name + '\' at ' + formatPosition(propertyToken[1][2][0]) + '. Ignoring.');
+ property.unused = true;
+ continue;
+ }
+
+ if (property.value.length === 0) {
+ propertyToken = property.all[property.position];
+ context.warnings.push('Empty property \'' + name + '\' at ' + formatPosition(propertyToken[1][2][0]) + '. Ignoring.');
+ property.unused = true;
+ continue;
+ }
+
+ if (property.hack && (
+ (property.hack[0] == Hack.ASTERISK || property.hack[0] == Hack.UNDERSCORE) && !options.compatibility.properties.iePrefixHack ||
+ property.hack[0] == Hack.BACKSLASH && !options.compatibility.properties.ieSuffixHack ||
+ property.hack[0] == Hack.BANG && !options.compatibility.properties.ieBangHack)) {
+ property.unused = true;
+ continue;
+ }
+
+ if (!options.compatibility.properties.ieFilters && isLegacyFilter(property)) {
+ property.unused = true;
+ continue;
+ }
+
+ if (property.block) {
+ optimizeBody(rule, property.value[0][1], context);
+ continue;
+ }
+
+ if (VARIABLE_NAME_PATTERN.test(name)) {
+ continue;
+ }
+
+ valuesLoop:
+ for (j = 0, m = property.value.length; j < m; j++) {
+ type = property.value[j][0];
+ value = property.value[j][1];
+
+ if (type == Token.PROPERTY_BLOCK) {
+ property.unused = true;
+ context.warnings.push('Invalid value token at ' + formatPosition(value[0][1][2][0]) + '. Ignoring.');
+ break;
+ }
+
+ if (startsAsUrl(value) && !context.validator.isUrl(value)) {
+ property.unused = true;
+ context.warnings.push('Broken URL \'' + value + '\' at ' + formatPosition(property.value[j][2][0]) + '. Ignoring.');
+ break;
+ }
+
+ for (k = 0, n = valueOptimizers.length; k < n; k++) {
+ value = valueOptimizers[k](name, value, options);
+ }
+
+ for (k = 0, n = pluginValueOptimizers.length; k < n; k++) {
+ value = pluginValueOptimizers[k](name, value, options);
+ }
+
+ property.value[j][1] = value;
+ }
+
+ propertyOptimizer(serializedRule, property, options);
+
+ for (j = 0, m = pluginPropertyOptimizers.length; j < m; j++) {
+ pluginPropertyOptimizers[j](serializedRule, property, options);
+ }
+ }
+
+ restoreFromOptimizing(_properties);
+ removeUnused(_properties);
+ removeComments(properties, options);
+}
+
+function removeComments(tokens, options) {
+ var token;
+ var i;
+
+ for (i = 0; i < tokens.length; i++) {
+ token = tokens[i];
+
+ if (token[0] != Token.COMMENT) {
+ continue;
+ }
+
+ optimizeComment(token, options);
+
+ if (token[1].length === 0) {
+ tokens.splice(i, 1);
+ i--;
+ }
+ }
+}
+
+function optimizeComment(token, options) {
+ if (token[1][2] == Marker.EXCLAMATION && (options.level[OptimizationLevel.One].specialComments == 'all' || options.commentsKept < options.level[OptimizationLevel.One].specialComments)) {
+ options.commentsKept++;
+ return;
+ }
+
+ token[1] = [];
+}
+
+function cleanupCharsets(tokens) {
+ var hasCharset = false;
+
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ var token = tokens[i];
+
+ if (token[0] != Token.AT_RULE)
+ continue;
+
+ if (!CHARSET_REGEXP.test(token[1]))
+ continue;
+
+ if (hasCharset || token[1].indexOf(CHARSET_TOKEN) == -1) {
+ tokens.splice(i, 1);
+ i--;
+ l--;
+ } else {
+ hasCharset = true;
+ tokens.splice(i, 1);
+ tokens.unshift([Token.AT_RULE, token[1].replace(CHARSET_REGEXP, CHARSET_TOKEN)]);
+ }
+ }
+}
+
+function buildUnitRegexp(options) {
+ var units = ['px', 'em', 'ex', 'cm', 'mm', 'in', 'pt', 'pc', '%'];
+ var otherUnits = ['ch', 'rem', 'vh', 'vm', 'vmax', 'vmin', 'vw'];
+
+ otherUnits.forEach(function (unit) {
+ if (options.compatibility.units[unit]) {
+ units.push(unit);
+ }
+ });
+
+ return new RegExp('(^|\\s|\\(|,)0(?:' + units.join('|') + ')(\\W|$)', 'g');
+}
+
+function buildPrecisionOptions(roundingPrecision) {
+ var precisionOptions = {
+ matcher: null,
+ units: {},
+ };
+ var optimizable = [];
+ var unit;
+ var value;
+
+ for (unit in roundingPrecision) {
+ value = roundingPrecision[unit];
+
+ if (value != DEFAULT_ROUNDING_PRECISION) {
+ precisionOptions.units[unit] = {};
+ precisionOptions.units[unit].value = value;
+ precisionOptions.units[unit].multiplier = Math.pow(10, value);
+
+ optimizable.push(unit);
+ }
+ }
+
+ if (optimizable.length > 0) {
+ precisionOptions.enabled = true;
+ precisionOptions.decimalPointMatcher = new RegExp('(\\d)\\.($|' + optimizable.join('|') + ')($|\W)', 'g');
+ precisionOptions.zeroMatcher = new RegExp('(\\d*)(\\.\\d+)(' + optimizable.join('|') + ')', 'g');
+ }
+
+ return precisionOptions;
+}
+
+function level1Optimize(tokens, context) {
+ var options = context.options;
+ var levelOptions = options.level[OptimizationLevel.One];
+ var ie7Hack = options.compatibility.selectors.ie7Hack;
+ var adjacentSpace = options.compatibility.selectors.adjacentSpace;
+ var spaceAfterClosingBrace = options.compatibility.properties.spaceAfterClosingBrace;
+ var format = options.format;
+ var mayHaveCharset = false;
+ var afterRules = false;
+
+ options.unitsRegexp = options.unitsRegexp || buildUnitRegexp(options);
+ options.precision = options.precision || buildPrecisionOptions(levelOptions.roundingPrecision);
+ options.commentsKept = options.commentsKept || 0;
+
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ var token = tokens[i];
+
+ switch (token[0]) {
+ case Token.AT_RULE:
+ token[1] = isImport(token) && afterRules ? '' : token[1];
+ token[1] = levelOptions.tidyAtRules ? tidyAtRule(token[1]) : token[1];
+ mayHaveCharset = true;
+ break;
+ case Token.AT_RULE_BLOCK:
+ optimizeBody(token[1], token[2], context);
+ afterRules = true;
+ break;
+ case Token.NESTED_BLOCK:
+ token[1] = levelOptions.tidyBlockScopes ? tidyBlock(token[1], spaceAfterClosingBrace) : token[1];
+ level1Optimize(token[2], context);
+ afterRules = true;
+ break;
+ case Token.COMMENT:
+ optimizeComment(token, options);
+ break;
+ case Token.RULE:
+ token[1] = levelOptions.tidySelectors ? tidyRules(token[1], !ie7Hack, adjacentSpace, format, context.warnings) : token[1];
+ token[1] = token[1].length > 1 ? sortSelectors(token[1], levelOptions.selectorsSortingMethod) : token[1];
+ optimizeBody(token[1], token[2], context);
+ afterRules = true;
+ break;
+ }
+
+ if (token[0] == Token.COMMENT && token[1].length === 0 || levelOptions.removeEmpty && (token[1].length === 0 || (token[2] && token[2].length === 0))) {
+ tokens.splice(i, 1);
+ i--;
+ l--;
+ }
+ }
+
+ if (levelOptions.cleanupCharsets && mayHaveCharset) {
+ cleanupCharsets(tokens);
+ }
+
+ return tokens;
+}
+
+module.exports = level1Optimize;
+
+
+/***/ }),
+
+/***/ 9281:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = {
+ background: __webpack_require__(5599).level1.property,
+ boxShadow: __webpack_require__(5823).level1.property,
+ borderRadius: __webpack_require__(6386).level1.property,
+ filter: __webpack_require__(6897).level1.property,
+ fontWeight: __webpack_require__(5069).level1.property,
+ margin: __webpack_require__(997).level1.property,
+ outline: __webpack_require__(5423).level1.property,
+ padding: __webpack_require__(1269).level1.property
+};
+
+
+/***/ }),
+
+/***/ 5599:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var plugin = {
+ level1: {
+ property: function background(_rule, property, options) {
+ var values = property.value;
+
+ if (!options.level[OptimizationLevel.One].optimizeBackground) {
+ return;
+ }
+
+ if (values.length == 1 && values[0][1] == 'none') {
+ values[0][1] = '0 0';
+ }
+
+ if (values.length == 1 && values[0][1] == 'transparent') {
+ values[0][1] = '0 0';
+ }
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 6386:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var plugin = {
+ level1: {
+ property: function borderRadius(_rule, property, options) {
+ var values = property.value;
+
+ if (!options.level[OptimizationLevel.One].optimizeBorderRadius) {
+ return;
+ }
+
+ if (values.length == 3 && values[1][1] == '/' && values[0][1] == values[2][1]) {
+ property.value.splice(1);
+ property.dirty = true;
+ } else if (values.length == 5 && values[2][1] == '/' && values[0][1] == values[3][1] && values[1][1] == values[4][1]) {
+ property.value.splice(2);
+ property.dirty = true;
+ } else if (values.length == 7 && values[3][1] == '/' && values[0][1] == values[4][1] && values[1][1] == values[5][1] && values[2][1] == values[6][1]) {
+ property.value.splice(3);
+ property.dirty = true;
+ } else if (values.length == 9 && values[4][1] == '/' && values[0][1] == values[5][1] && values[1][1] == values[6][1] && values[2][1] == values[7][1] && values[3][1] == values[8][1]) {
+ property.value.splice(4);
+ property.dirty = true;
+ }
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 5823:
+/***/ ((module) => {
+
+var plugin = {
+ level1: {
+ property: function boxShadow(_rule, property) {
+ var values = property.value;
+
+ // remove multiple zeros
+ if (values.length == 4 && values[0][1] === '0' && values[1][1] === '0' && values[2][1] === '0' && values[3][1] === '0') {
+ property.value.splice(2);
+ property.dirty = true;
+ }
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 6897:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var ALPHA_OR_CHROMA_FILTER_PATTERN = /progid:DXImageTransform\.Microsoft\.(Alpha|Chroma)(\W)/;
+var NO_SPACE_AFTER_COMMA_PATTERN = /,(\S)/g;
+var WHITESPACE_AROUND_EQUALS_PATTERN = / ?= ?/g;
+
+var plugin = {
+ level1: {
+ property: function filter(_rule, property, options) {
+ if (!options.compatibility.properties.ieFilters) {
+ return;
+ }
+
+ if (!options.level[OptimizationLevel.One].optimizeFilter) {
+ return;
+ }
+
+ if (property.value.length == 1) {
+ property.value[0][1] = property.value[0][1].replace(ALPHA_OR_CHROMA_FILTER_PATTERN, function (match, filter, suffix) {
+ return filter.toLowerCase() + suffix;
+ });
+ }
+
+ property.value[0][1] = property.value[0][1]
+ .replace(NO_SPACE_AFTER_COMMA_PATTERN, ', $1')
+ .replace(WHITESPACE_AROUND_EQUALS_PATTERN, '=');
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 5069:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var plugin = {
+ level1: {
+ property: function fontWeight(_rule, property, options) {
+ var value = property.value[0][1];
+
+ if (!options.level[OptimizationLevel.One].optimizeFontWeight) {
+ return;
+ }
+
+ if (value == 'normal') {
+ value = '400';
+ } else if (value == 'bold') {
+ value = '700';
+ }
+
+ property.value[0][1] = value;
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 997:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var plugin = {
+ level1: {
+ property: function margin(_rule, property, options) {
+ var values = property.value;
+
+ if (!options.level[OptimizationLevel.One].replaceMultipleZeros) {
+ return;
+ }
+
+ // remove multiple zeros
+ if (values.length == 4 && values[0][1] === '0' && values[1][1] === '0' && values[2][1] === '0' && values[3][1] === '0') {
+ property.value.splice(1);
+ property.dirty = true;
+ }
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 5423:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var plugin = {
+ level1: {
+ property: function outline(_rule, property, options) {
+ var values = property.value;
+
+ if (!options.level[OptimizationLevel.One].optimizeOutline) {
+ return;
+ }
+
+ if (values.length == 1 && values[0][1] == 'none') {
+ values[0][1] = '0';
+ }
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 1269:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+function isNegative(value) {
+ return value && value[1][0] == '-' && parseFloat(value[1]) < 0;
+}
+
+var plugin = {
+ level1: {
+ property: function padding(_rule, property, options) {
+ var values = property.value;
+
+ // remove multiple zeros
+ if (values.length == 4 && values[0][1] === '0' && values[1][1] === '0' && values[2][1] === '0' && values[3][1] === '0') {
+ property.value.splice(1);
+ property.dirty = true;
+ }
+
+ // remove negative paddings
+ if (options.level[OptimizationLevel.One].removeNegativePaddings && (isNegative(property.value[0]) || isNegative(property.value[1]) || isNegative(property.value[2]) || isNegative(property.value[3]))) {
+ property.unused = true;
+ }
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 4290:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var naturalCompare = __webpack_require__(9062);
+
+function naturalSorter(scope1, scope2) {
+ return naturalCompare(scope1[1], scope2[1]);
+}
+
+function standardSorter(scope1, scope2) {
+ return scope1[1] > scope2[1] ? 1 : -1;
+}
+
+function sortSelectors(selectors, method) {
+ switch (method) {
+ case 'natural':
+ return selectors.sort(naturalSorter);
+ case 'standard':
+ return selectors.sort(standardSorter);
+ case 'none':
+ case false:
+ return selectors;
+ }
+}
+
+module.exports = sortSelectors;
+
+
+/***/ }),
+
+/***/ 9534:
+/***/ ((module) => {
+
+function tidyAtRule(value) {
+ return value
+ .replace(/\s+/g, ' ')
+ .replace(/url\(\s+/g, 'url(')
+ .replace(/\s+\)/g, ')')
+ .trim();
+}
+
+module.exports = tidyAtRule;
+
+
+/***/ }),
+
+/***/ 8363:
+/***/ ((module) => {
+
+var SUPPORTED_COMPACT_BLOCK_MATCHER = /^@media\W/;
+var SUPPORTED_QUOTE_REMOVAL_MATCHER = /^@(?:keyframes|-moz-keyframes|-o-keyframes|-webkit-keyframes)\W/;
+
+function tidyBlock(values, spaceAfterClosingBrace) {
+ var withoutSpaceAfterClosingBrace;
+ var withoutQuotes;
+ var i;
+
+ for (i = values.length - 1; i >= 0; i--) {
+ withoutSpaceAfterClosingBrace = !spaceAfterClosingBrace && SUPPORTED_COMPACT_BLOCK_MATCHER.test(values[i][1]);
+ withoutQuotes = SUPPORTED_QUOTE_REMOVAL_MATCHER.test(values[i][1]);
+
+ values[i][1] = values[i][1]
+ .replace(/\n|\r\n/g, ' ')
+ .replace(/\s+/g, ' ')
+ .replace(/(,|:|\() /g, '$1')
+ .replace(/ \)/g, ')');
+
+ if (withoutQuotes) {
+ values[i][1] = values[i][1]
+ .replace(/'([a-zA-Z][a-zA-Z\d\-_]+)'/, '$1')
+ .replace(/"([a-zA-Z][a-zA-Z\d\-_]+)"/, '$1');
+ }
+
+ if (withoutSpaceAfterClosingBrace) {
+ values[i][1] = values[i][1]
+ .replace(/\) /g, ')');
+ }
+ }
+
+ return values;
+}
+
+module.exports = tidyBlock;
+
+
+/***/ }),
+
+/***/ 2569:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Spaces = __webpack_require__(3320).Spaces;
+var Marker = __webpack_require__(2638);
+var formatPosition = __webpack_require__(7270);
+
+var CASE_ATTRIBUTE_PATTERN = /[\s"'][iI]\s*\]/;
+var CASE_RESTORE_PATTERN = /([\d\w])([iI])\]/g;
+var DOUBLE_QUOTE_CASE_PATTERN = /="([a-zA-Z][a-zA-Z\d\-_]+)"([iI])/g;
+var DOUBLE_QUOTE_PATTERN = /="([a-zA-Z][a-zA-Z\d\-_]+)"(\s|\])/g;
+var HTML_COMMENT_PATTERN = /^(?:(?:)\s*)+/;
+var SINGLE_QUOTE_CASE_PATTERN = /='([a-zA-Z][a-zA-Z\d\-_]+)'([iI])/g;
+var SINGLE_QUOTE_PATTERN = /='([a-zA-Z][a-zA-Z\d\-_]+)'(\s|\])/g;
+var RELATION_PATTERN = /[>\+~]/;
+var WHITESPACE_PATTERN = /\s/;
+
+var ASTERISK_PLUS_HTML_HACK = '*+html ';
+var ASTERISK_FIRST_CHILD_PLUS_HTML_HACK = '*:first-child+html ';
+var LESS_THAN = '<';
+
+var PSEUDO_CLASSES_WITH_SELECTORS = [
+ ':current',
+ ':future',
+ ':has',
+ ':host',
+ ':host-context',
+ ':is',
+ ':not',
+ ':past',
+ ':where'
+];
+
+function hasInvalidCharacters(value) {
+ var isEscaped;
+ var isInvalid = false;
+ var character;
+ var isQuote = false;
+ var i, l;
+
+ for (i = 0, l = value.length; i < l; i++) {
+ character = value[i];
+
+ if (isEscaped) {
+ // continue as always
+ } else if (character == Marker.SINGLE_QUOTE || character == Marker.DOUBLE_QUOTE) {
+ isQuote = !isQuote;
+ } else if (!isQuote && (character == Marker.CLOSE_CURLY_BRACKET || character == Marker.EXCLAMATION || character == LESS_THAN || character == Marker.SEMICOLON)) {
+ isInvalid = true;
+ break;
+ } else if (!isQuote && i === 0 && RELATION_PATTERN.test(character)) {
+ isInvalid = true;
+ break;
+ }
+
+ isEscaped = character == Marker.BACK_SLASH;
+ }
+
+ return isInvalid;
+}
+
+function removeWhitespace(value, format) {
+ var stripped = [];
+ var character;
+ var isNewLineNix;
+ var isNewLineWin;
+ var isEscaped;
+ var wasEscaped;
+ var isQuoted;
+ var isSingleQuoted;
+ var isDoubleQuoted;
+ var isAttribute;
+ var isRelation;
+ var isWhitespace;
+ var isSpaceAwarePseudoClass;
+ var roundBracketLevel = 0;
+ var wasComma = false;
+ var wasRelation = false;
+ var wasWhitespace = false;
+ var withCaseAttribute = CASE_ATTRIBUTE_PATTERN.test(value);
+ var spaceAroundRelation = format && format.spaces[Spaces.AroundSelectorRelation];
+ var i, l;
+
+ for (i = 0, l = value.length; i < l; i++) {
+ character = value[i];
+
+ isNewLineNix = character == Marker.NEW_LINE_NIX;
+ isNewLineWin = character == Marker.NEW_LINE_NIX && value[i - 1] == Marker.CARRIAGE_RETURN;
+ isQuoted = isSingleQuoted || isDoubleQuoted;
+ isRelation = !isAttribute && !isEscaped && roundBracketLevel === 0 && RELATION_PATTERN.test(character);
+ isWhitespace = WHITESPACE_PATTERN.test(character);
+ isSpaceAwarePseudoClass = roundBracketLevel == 1 && character == Marker.CLOSE_ROUND_BRACKET ?
+ false :
+ isSpaceAwarePseudoClass || (roundBracketLevel === 0 && character == Marker.COLON && isPseudoClassWithSelectors(value, i));
+
+ if (wasEscaped && isQuoted && isNewLineWin) {
+ // swallow escaped new windows lines in comments
+ stripped.pop();
+ stripped.pop();
+ } else if (isEscaped && isQuoted && isNewLineNix) {
+ // swallow escaped new *nix lines in comments
+ stripped.pop();
+ } else if (isEscaped) {
+ stripped.push(character);
+ } else if (character == Marker.OPEN_SQUARE_BRACKET && !isQuoted) {
+ stripped.push(character);
+ isAttribute = true;
+ } else if (character == Marker.CLOSE_SQUARE_BRACKET && !isQuoted) {
+ stripped.push(character);
+ isAttribute = false;
+ } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted) {
+ stripped.push(character);
+ roundBracketLevel++;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted) {
+ stripped.push(character);
+ roundBracketLevel--;
+ } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {
+ stripped.push(character);
+ isSingleQuoted = true;
+ } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {
+ stripped.push(character);
+ isDoubleQuoted = true;
+ } else if (character == Marker.SINGLE_QUOTE && isQuoted) {
+ stripped.push(character);
+ isSingleQuoted = false;
+ } else if (character == Marker.DOUBLE_QUOTE && isQuoted) {
+ stripped.push(character);
+ isDoubleQuoted = false;
+ } else if (isWhitespace && wasRelation && !spaceAroundRelation) {
+ continue;
+ } else if (!isWhitespace && wasRelation && spaceAroundRelation) {
+ stripped.push(Marker.SPACE);
+ stripped.push(character);
+ } else if (isWhitespace && !wasWhitespace && wasComma && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {
+ // skip space
+ } else if (isWhitespace && !wasWhitespace && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {
+ stripped.push(character);
+ } else if (isWhitespace && (isAttribute || roundBracketLevel > 0) && !isQuoted) {
+ // skip space
+ } else if (isWhitespace && wasWhitespace && !isQuoted) {
+ // skip extra space
+ } else if ((isNewLineWin || isNewLineNix) && (isAttribute || roundBracketLevel > 0) && isQuoted) {
+ // skip newline
+ } else if (isRelation && wasWhitespace && !spaceAroundRelation) {
+ stripped.pop();
+ stripped.push(character);
+ } else if (isRelation && !wasWhitespace && spaceAroundRelation) {
+ stripped.push(Marker.SPACE);
+ stripped.push(character);
+ } else if (isWhitespace) {
+ stripped.push(Marker.SPACE);
+ } else {
+ stripped.push(character);
+ }
+
+ wasEscaped = isEscaped;
+ isEscaped = character == Marker.BACK_SLASH;
+ wasRelation = isRelation;
+ wasWhitespace = isWhitespace;
+ wasComma = character == Marker.COMMA;
+ }
+
+ return withCaseAttribute ?
+ stripped.join('').replace(CASE_RESTORE_PATTERN, '$1 $2]') :
+ stripped.join('');
+}
+
+function isPseudoClassWithSelectors(value, colonPosition) {
+ var pseudoClass = value.substring(colonPosition, value.indexOf(Marker.OPEN_ROUND_BRACKET, colonPosition));
+
+ return PSEUDO_CLASSES_WITH_SELECTORS.indexOf(pseudoClass) > -1;
+}
+
+function removeQuotes(value) {
+ if (value.indexOf('\'') == -1 && value.indexOf('"') == -1) {
+ return value;
+ }
+
+ return value
+ .replace(SINGLE_QUOTE_CASE_PATTERN, '=$1 $2')
+ .replace(SINGLE_QUOTE_PATTERN, '=$1$2')
+ .replace(DOUBLE_QUOTE_CASE_PATTERN, '=$1 $2')
+ .replace(DOUBLE_QUOTE_PATTERN, '=$1$2');
+}
+
+function tidyRules(rules, removeUnsupported, adjacentSpace, format, warnings) {
+ var list = [];
+ var repeated = [];
+
+ function removeHTMLComment(rule, match) {
+ warnings.push('HTML comment \'' + match + '\' at ' + formatPosition(rule[2][0]) + '. Removing.');
+ return '';
+ }
+
+ for (var i = 0, l = rules.length; i < l; i++) {
+ var rule = rules[i];
+ var reduced = rule[1];
+
+ reduced = reduced.replace(HTML_COMMENT_PATTERN, removeHTMLComment.bind(null, rule));
+
+ if (hasInvalidCharacters(reduced)) {
+ warnings.push('Invalid selector \'' + rule[1] + '\' at ' + formatPosition(rule[2][0]) + '. Ignoring.');
+ continue;
+ }
+
+ reduced = removeWhitespace(reduced, format);
+ reduced = removeQuotes(reduced);
+
+ if (adjacentSpace && reduced.indexOf('nav') > 0) {
+ reduced = reduced.replace(/\+nav(\S|$)/, '+ nav$1');
+ }
+
+ if (removeUnsupported && reduced.indexOf(ASTERISK_PLUS_HTML_HACK) > -1) {
+ continue;
+ }
+
+ if (removeUnsupported && reduced.indexOf(ASTERISK_FIRST_CHILD_PLUS_HTML_HACK) > -1) {
+ continue;
+ }
+
+ if (reduced.indexOf('*') > -1) {
+ reduced = reduced
+ .replace(/\*([:#\.\[])/g, '$1')
+ .replace(/^(\:first\-child)?\+html/, '*$1+html');
+ }
+
+ if (repeated.indexOf(reduced) > -1) {
+ continue;
+ }
+
+ rule[1] = reduced;
+ repeated.push(reduced);
+ list.push(rule);
+ }
+
+ if (list.length == 1 && list[0][1].length === 0) {
+ warnings.push('Empty selector \'' + list[0][1] + '\' at ' + formatPosition(list[0][2][0]) + '. Ignoring.');
+ list = [];
+ }
+
+ return list;
+}
+
+module.exports = tidyRules;
+
+
+/***/ }),
+
+/***/ 2039:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = {
+ color: __webpack_require__(5041).level1.value,
+ degrees: __webpack_require__(1468).level1.value,
+ fraction: __webpack_require__(5988).level1.value,
+ precision: __webpack_require__(71).level1.value,
+ textQuotes: __webpack_require__(3210).level1.value,
+ time: __webpack_require__(3303).level1.value,
+ unit: __webpack_require__(2975).level1.value,
+ urlPrefix: __webpack_require__(5009).level1.value,
+ urlQuotes: __webpack_require__(4360).level1.value,
+ urlWhiteSpace: __webpack_require__(3357).level1.value,
+ whiteSpace: __webpack_require__(1229).level1.value,
+ zero: __webpack_require__(8283).level1.value
+};
+
+
+/***/ }),
+
+/***/ 5041:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var shortenHex = __webpack_require__(5488);
+var shortenHsl = __webpack_require__(3003);
+var shortenRgb = __webpack_require__(7059);
+
+var split = __webpack_require__(8794);
+
+var ANY_COLOR_FUNCTION_PATTERN = /(rgb|rgba|hsl|hsla)\(([^\(\)]+)\)/gi;
+var COLOR_PREFIX_PATTERN = /#|rgb|hsl/gi;
+var HEX_LONG_PATTERN = /(^|[^='"])#([0-9a-f]{6})/gi;
+var HEX_SHORT_PATTERN = /(^|[^='"])#([0-9a-f]{3})/gi;
+var HEX_VALUE_PATTERN = /[0-9a-f]/i;
+var HSL_PATTERN = /hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/gi;
+var RGBA_HSLA_PATTERN = /(rgb|hsl)a?\((\-?\d+),(\-?\d+\%?),(\-?\d+\%?),(0*[1-9]+[0-9]*(\.?\d*)?)\)/gi;
+var RGB_PATTERN = /rgb\((\-?\d+),(\-?\d+),(\-?\d+)\)/gi;
+var TRANSPARENT_FUNCTION_PATTERN = /(?:rgba|hsla)\(0,0%?,0%?,0\)/g;
+
+var plugin = {
+ level1: {
+ value: function color(name, value, options) {
+ if (!options.compatibility.properties.colors) {
+ return value;
+ }
+
+ if (!value.match(COLOR_PREFIX_PATTERN)) {
+ return shortenHex(value);
+ }
+
+ value = value
+ .replace(RGBA_HSLA_PATTERN, function (match, colorFn, p1, p2, p3, alpha) {
+ return (parseInt(alpha, 10) >= 1 ? colorFn + '(' + [p1,p2,p3].join(',') + ')' : match);
+ })
+ .replace(RGB_PATTERN, function (match, red, green, blue) {
+ return shortenRgb(red, green, blue);
+ })
+ .replace(HSL_PATTERN, function (match, hue, saturation, lightness) {
+ return shortenHsl(hue, saturation, lightness);
+ })
+ .replace(HEX_LONG_PATTERN, function (match, prefix, color, at, inputValue) {
+ var suffix = inputValue[at + match.length];
+
+ if (suffix && HEX_VALUE_PATTERN.test(suffix)) {
+ return match;
+ } else if (color[0] == color[1] && color[2] == color[3] && color[4] == color[5]) {
+ return (prefix + '#' + color[0] + color[2] + color[4]).toLowerCase();
+ } else {
+ return (prefix + '#' + color).toLowerCase();
+ }
+ })
+ .replace(HEX_SHORT_PATTERN, function (match, prefix, color) {
+ return prefix + '#' + color.toLowerCase();
+ })
+ .replace(ANY_COLOR_FUNCTION_PATTERN, function (match, colorFunction, colorDef) {
+ var tokens = colorDef.split(',');
+ var colorFnLowercase = colorFunction && colorFunction.toLowerCase();
+ var applies = (colorFnLowercase == 'hsl' && tokens.length == 3) ||
+ (colorFnLowercase == 'hsla' && tokens.length == 4) ||
+ (colorFnLowercase == 'rgb' && tokens.length === 3 && colorDef.indexOf('%') > 0) ||
+ (colorFnLowercase == 'rgba' && tokens.length == 4 && colorDef.indexOf('%') > 0);
+
+ if (!applies) {
+ return match;
+ }
+
+ if (tokens[1].indexOf('%') == -1) {
+ tokens[1] += '%';
+ }
+
+ if (tokens[2].indexOf('%') == -1) {
+ tokens[2] += '%';
+ }
+
+ return colorFunction + '(' + tokens.join(',') + ')';
+ });
+
+ if (options.compatibility.colors.opacity && name.indexOf('background') == -1) {
+ value = value.replace(TRANSPARENT_FUNCTION_PATTERN, function (match) {
+ if (split(value, ',').pop().indexOf('gradient(') > -1) {
+ return match;
+ }
+
+ return 'transparent';
+ });
+ }
+
+ return shortenHex(value);
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 5488:
+/***/ ((module) => {
+
+var COLORS = {
+ aliceblue: '#f0f8ff',
+ antiquewhite: '#faebd7',
+ aqua: '#0ff',
+ aquamarine: '#7fffd4',
+ azure: '#f0ffff',
+ beige: '#f5f5dc',
+ bisque: '#ffe4c4',
+ black: '#000',
+ blanchedalmond: '#ffebcd',
+ blue: '#00f',
+ blueviolet: '#8a2be2',
+ brown: '#a52a2a',
+ burlywood: '#deb887',
+ cadetblue: '#5f9ea0',
+ chartreuse: '#7fff00',
+ chocolate: '#d2691e',
+ coral: '#ff7f50',
+ cornflowerblue: '#6495ed',
+ cornsilk: '#fff8dc',
+ crimson: '#dc143c',
+ cyan: '#0ff',
+ darkblue: '#00008b',
+ darkcyan: '#008b8b',
+ darkgoldenrod: '#b8860b',
+ darkgray: '#a9a9a9',
+ darkgreen: '#006400',
+ darkgrey: '#a9a9a9',
+ darkkhaki: '#bdb76b',
+ darkmagenta: '#8b008b',
+ darkolivegreen: '#556b2f',
+ darkorange: '#ff8c00',
+ darkorchid: '#9932cc',
+ darkred: '#8b0000',
+ darksalmon: '#e9967a',
+ darkseagreen: '#8fbc8f',
+ darkslateblue: '#483d8b',
+ darkslategray: '#2f4f4f',
+ darkslategrey: '#2f4f4f',
+ darkturquoise: '#00ced1',
+ darkviolet: '#9400d3',
+ deeppink: '#ff1493',
+ deepskyblue: '#00bfff',
+ dimgray: '#696969',
+ dimgrey: '#696969',
+ dodgerblue: '#1e90ff',
+ firebrick: '#b22222',
+ floralwhite: '#fffaf0',
+ forestgreen: '#228b22',
+ fuchsia: '#f0f',
+ gainsboro: '#dcdcdc',
+ ghostwhite: '#f8f8ff',
+ gold: '#ffd700',
+ goldenrod: '#daa520',
+ gray: '#808080',
+ green: '#008000',
+ greenyellow: '#adff2f',
+ grey: '#808080',
+ honeydew: '#f0fff0',
+ hotpink: '#ff69b4',
+ indianred: '#cd5c5c',
+ indigo: '#4b0082',
+ ivory: '#fffff0',
+ khaki: '#f0e68c',
+ lavender: '#e6e6fa',
+ lavenderblush: '#fff0f5',
+ lawngreen: '#7cfc00',
+ lemonchiffon: '#fffacd',
+ lightblue: '#add8e6',
+ lightcoral: '#f08080',
+ lightcyan: '#e0ffff',
+ lightgoldenrodyellow: '#fafad2',
+ lightgray: '#d3d3d3',
+ lightgreen: '#90ee90',
+ lightgrey: '#d3d3d3',
+ lightpink: '#ffb6c1',
+ lightsalmon: '#ffa07a',
+ lightseagreen: '#20b2aa',
+ lightskyblue: '#87cefa',
+ lightslategray: '#778899',
+ lightslategrey: '#778899',
+ lightsteelblue: '#b0c4de',
+ lightyellow: '#ffffe0',
+ lime: '#0f0',
+ limegreen: '#32cd32',
+ linen: '#faf0e6',
+ magenta: '#ff00ff',
+ maroon: '#800000',
+ mediumaquamarine: '#66cdaa',
+ mediumblue: '#0000cd',
+ mediumorchid: '#ba55d3',
+ mediumpurple: '#9370db',
+ mediumseagreen: '#3cb371',
+ mediumslateblue: '#7b68ee',
+ mediumspringgreen: '#00fa9a',
+ mediumturquoise: '#48d1cc',
+ mediumvioletred: '#c71585',
+ midnightblue: '#191970',
+ mintcream: '#f5fffa',
+ mistyrose: '#ffe4e1',
+ moccasin: '#ffe4b5',
+ navajowhite: '#ffdead',
+ navy: '#000080',
+ oldlace: '#fdf5e6',
+ olive: '#808000',
+ olivedrab: '#6b8e23',
+ orange: '#ffa500',
+ orangered: '#ff4500',
+ orchid: '#da70d6',
+ palegoldenrod: '#eee8aa',
+ palegreen: '#98fb98',
+ paleturquoise: '#afeeee',
+ palevioletred: '#db7093',
+ papayawhip: '#ffefd5',
+ peachpuff: '#ffdab9',
+ peru: '#cd853f',
+ pink: '#ffc0cb',
+ plum: '#dda0dd',
+ powderblue: '#b0e0e6',
+ purple: '#800080',
+ rebeccapurple: '#663399',
+ red: '#f00',
+ rosybrown: '#bc8f8f',
+ royalblue: '#4169e1',
+ saddlebrown: '#8b4513',
+ salmon: '#fa8072',
+ sandybrown: '#f4a460',
+ seagreen: '#2e8b57',
+ seashell: '#fff5ee',
+ sienna: '#a0522d',
+ silver: '#c0c0c0',
+ skyblue: '#87ceeb',
+ slateblue: '#6a5acd',
+ slategray: '#708090',
+ slategrey: '#708090',
+ snow: '#fffafa',
+ springgreen: '#00ff7f',
+ steelblue: '#4682b4',
+ tan: '#d2b48c',
+ teal: '#008080',
+ thistle: '#d8bfd8',
+ tomato: '#ff6347',
+ turquoise: '#40e0d0',
+ violet: '#ee82ee',
+ wheat: '#f5deb3',
+ white: '#fff',
+ whitesmoke: '#f5f5f5',
+ yellow: '#ff0',
+ yellowgreen: '#9acd32'
+};
+
+var toHex = {};
+var toName = {};
+
+for (var name in COLORS) {
+ var hex = COLORS[name];
+
+ if (name.length < hex.length) {
+ toName[hex] = name;
+ } else {
+ toHex[name] = hex;
+ }
+}
+
+var toHexPattern = new RegExp('(^| |,|\\))(' + Object.keys(toHex).join('|') + ')( |,|\\)|$)', 'ig');
+var toNamePattern = new RegExp('(' + Object.keys(toName).join('|') + ')([^a-f0-9]|$)', 'ig');
+
+function hexConverter(match, prefix, colorValue, suffix) {
+ return prefix + toHex[colorValue.toLowerCase()] + suffix;
+}
+
+function nameConverter(match, colorValue, suffix) {
+ return toName[colorValue.toLowerCase()] + suffix;
+}
+
+function shortenHex(value) {
+ var hasHex = value.indexOf('#') > -1;
+ var shortened = value.replace(toHexPattern, hexConverter);
+
+ if (shortened != value) {
+ shortened = shortened.replace(toHexPattern, hexConverter);
+ }
+
+ return hasHex ?
+ shortened.replace(toNamePattern, nameConverter) :
+ shortened;
+}
+
+module.exports = shortenHex;
+
+
+/***/ }),
+
+/***/ 3003:
+/***/ ((module) => {
+
+// HSL to RGB converter. Both methods adapted from:
+// http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript
+
+function hslToRgb(h, s, l) {
+ var r, g, b;
+
+ // normalize hue orientation b/w 0 and 360 degrees
+ h = h % 360;
+ if (h < 0)
+ h += 360;
+ h = ~~h / 360;
+
+ if (s < 0)
+ s = 0;
+ else if (s > 100)
+ s = 100;
+ s = ~~s / 100;
+
+ if (l < 0)
+ l = 0;
+ else if (l > 100)
+ l = 100;
+ l = ~~l / 100;
+
+ if (s === 0) {
+ r = g = b = l; // achromatic
+ } else {
+ var q = l < 0.5 ?
+ l * (1 + s) :
+ l + s - l * s;
+ var p = 2 * l - q;
+ r = hueToRgb(p, q, h + 1/3);
+ g = hueToRgb(p, q, h);
+ b = hueToRgb(p, q, h - 1/3);
+ }
+
+ return [~~(r * 255), ~~(g * 255), ~~(b * 255)];
+}
+
+function hueToRgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1/6) return p + (q - p) * 6 * t;
+ if (t < 1/2) return q;
+ if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;
+ return p;
+}
+
+function shortenHsl(hue, saturation, lightness) {
+ var asRgb = hslToRgb(hue, saturation, lightness);
+ var redAsHex = asRgb[0].toString(16);
+ var greenAsHex = asRgb[1].toString(16);
+ var blueAsHex = asRgb[2].toString(16);
+
+ return '#' +
+ ((redAsHex.length == 1 ? '0' : '') + redAsHex) +
+ ((greenAsHex.length == 1 ? '0' : '') + greenAsHex) +
+ ((blueAsHex.length == 1 ? '0' : '') + blueAsHex);
+}
+
+module.exports = shortenHsl;
+
+
+/***/ }),
+
+/***/ 7059:
+/***/ ((module) => {
+
+function shortenRgb(red, green, blue) {
+ var normalizedRed = Math.max(0, Math.min(parseInt(red), 255));
+ var normalizedGreen = Math.max(0, Math.min(parseInt(green), 255));
+ var normalizedBlue = Math.max(0, Math.min(parseInt(blue), 255));
+
+ // Credit: Asen http://jsbin.com/UPUmaGOc/2/edit?js,console
+ return '#' + ('00000' + (normalizedRed << 16 | normalizedGreen << 8 | normalizedBlue).toString(16)).slice(-6);
+}
+
+module.exports = shortenRgb;
+
+
+/***/ }),
+
+/***/ 1468:
+/***/ ((module) => {
+
+var ZERO_DEG_PATTERN = /\(0deg\)/g;
+
+var plugin = {
+ level1: {
+ value: function degrees(_name, value, options) {
+ if (!options.compatibility.properties.zeroUnits) {
+ return value;
+ }
+
+ if (value.indexOf('0deg') == -1) {
+ return value;
+ }
+
+ return value.replace(ZERO_DEG_PATTERN, '(0)');
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 5988:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var startsAsUrl = __webpack_require__(745);
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var DOT_ZERO_PATTERN = /(^|\D)\.0+(\D|$)/g;
+var FRACTION_PATTERN = /\.([1-9]*)0+(\D|$)/g;
+var LEADING_ZERO_FRACTION_PATTERN = /(^|\D)0\.(\d)/g;
+var MINUS_ZERO_FRACTION_PATTERN = /([^\w\d\-]|^)\-0([^\.]|$)/g;
+var ZERO_PREFIXED_UNIT_PATTERN = /(^|\s)0+([1-9])/g;
+
+var plugin = {
+ level1: {
+ value: function fraction(name, value, options) {
+ if (!options.level[OptimizationLevel.One].replaceZeroUnits) {
+ return value;
+ }
+
+ if (startsAsUrl(value)) {
+ return value;
+ }
+
+ if (value.indexOf('0') == -1) {
+ return value;
+ }
+
+ if (value.indexOf('-') > -1) {
+ value = value
+ .replace(MINUS_ZERO_FRACTION_PATTERN, '$10$2')
+ .replace(MINUS_ZERO_FRACTION_PATTERN, '$10$2');
+ }
+
+ return value
+ .replace(ZERO_PREFIXED_UNIT_PATTERN, '$1$2')
+ .replace(DOT_ZERO_PATTERN, '$10$2')
+ .replace(FRACTION_PATTERN, function (match, nonZeroPart, suffix) {
+ return (nonZeroPart.length > 0 ? '.' : '') + nonZeroPart + suffix;
+ })
+ .replace(LEADING_ZERO_FRACTION_PATTERN, '$1.$2');
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 71:
+/***/ ((module) => {
+
+var plugin = {
+ level1: {
+ value: function precision(_name, value, options) {
+ if (!options.precision.enabled || value.indexOf('.') === -1) {
+ return value;
+ }
+
+ return value
+ .replace(options.precision.decimalPointMatcher, '$1$2$3')
+ .replace(options.precision.zeroMatcher, function (match, integerPart, fractionPart, unit) {
+ var multiplier = options.precision.units[unit].multiplier;
+ var parsedInteger = parseInt(integerPart);
+ var integer = isNaN(parsedInteger) ? 0 : parsedInteger;
+ var fraction = parseFloat(fractionPart);
+
+ return Math.round((integer + fraction) * multiplier) / multiplier + unit;
+ });
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 745:
+/***/ ((module) => {
+
+var URL_PREFIX_PATTERN = /^url\(/i;
+
+function startsAsUrl(value) {
+ return URL_PREFIX_PATTERN.test(value);
+}
+
+module.exports = startsAsUrl;
+
+
+/***/ }),
+
+/***/ 3210:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var LOCAL_PREFIX_PATTERN = /^local\(/i;
+var QUOTED_PATTERN = /^('.*'|".*")$/;
+var QUOTED_BUT_SAFE_PATTERN = /^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/;
+
+var plugin = {
+ level1: {
+ value: function textQuotes(_name, value, options) {
+ if (!options.level[OptimizationLevel.One].removeQuotes) {
+ return value;
+ }
+
+ if (!QUOTED_PATTERN.test(value) && !LOCAL_PREFIX_PATTERN.test(value)) {
+ return value;
+ }
+
+ return QUOTED_BUT_SAFE_PATTERN.test(value) ?
+ value.substring(1, value.length - 1) :
+ value;
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 3303:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var TIME_VALUE = /^(\-?[\d\.]+)(m?s)$/;
+
+var plugin = {
+ level1: {
+ value: function time(name, value, options) {
+ if (!options.level[OptimizationLevel.One].replaceTimeUnits) {
+ return value;
+ }
+
+ if (!TIME_VALUE.test(value)) {
+ return value;
+ }
+
+ return value.replace(TIME_VALUE, function (match, val, unit) {
+ var newValue;
+
+ if (unit == 'ms') {
+ newValue = parseInt(val) / 1000 + 's';
+ } else if (unit == 's') {
+ newValue = parseFloat(val) * 1000 + 'ms';
+ }
+
+ return newValue.length < match.length ? newValue : match;
+ });
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 2975:
+/***/ ((module) => {
+
+var WHOLE_PIXEL_VALUE = /(?:^|\s|\()(-?\d+)px/;
+
+var plugin = {
+ level1: {
+ value: function unit(_name, value, options) {
+ if (!WHOLE_PIXEL_VALUE.test(value)) {
+ return value;
+ }
+
+ return value.replace(WHOLE_PIXEL_VALUE, function (match, val) {
+ var newValue;
+ var intVal = parseInt(val);
+
+ if (intVal === 0) {
+ return match;
+ }
+
+ if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.pt && intVal * 3 % 4 === 0) {
+ newValue = intVal * 3 / 4 + 'pt';
+ }
+
+ if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.pc && intVal % 16 === 0) {
+ newValue = intVal / 16 + 'pc';
+ }
+
+ if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.in && intVal % 96 === 0) {
+ newValue = intVal / 96 + 'in';
+ }
+
+ if (newValue) {
+ newValue = match.substring(0, match.indexOf(val)) + newValue;
+ }
+
+ return newValue && newValue.length < match.length ? newValue : match;
+ });
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 5009:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var startsAsUrl = __webpack_require__(745);
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var URL_PREFIX_PATTERN = /^url\(/i;
+
+var plugin = {
+ level1: {
+ value: function urlPrefix(_name, value, options) {
+ if (!options.level[OptimizationLevel.One].normalizeUrls) {
+ return value;
+ }
+
+ if (!startsAsUrl(value)) {
+ return value;
+ }
+
+ return value.replace(URL_PREFIX_PATTERN, 'url(');
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 4360:
+/***/ ((module) => {
+
+var QUOTED_URL_PATTERN = /^url\(['"].+['"]\)$/;
+var QUOTED_URL_WITH_WHITESPACE_PATTERN = /^url\(['"].*[\*\s\(\)'"].*['"]\)$/;
+var QUOTES_PATTERN = /["']/g;
+var URL_DATA_PATTERN = /^url\(['"]data:[^;]+;charset/;
+
+var plugin = {
+ level1: {
+ value: function urlQuotes(_name, value, options) {
+ if (options.compatibility.properties.urlQuotes) {
+ return value;
+ }
+
+ return QUOTED_URL_PATTERN.test(value) && !QUOTED_URL_WITH_WHITESPACE_PATTERN.test(value) && !URL_DATA_PATTERN.test(value) ?
+ value.replace(QUOTES_PATTERN, '') :
+ value;
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 3357:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var startsAsUrl = __webpack_require__(745);
+
+var WHITESPACE_PATTERN = /\\?\n|\\?\r\n/g;
+var WHITESPACE_PREFIX_PATTERN = /(\()\s+/g;
+var WHITESPACE_SUFFIX_PATTERN = /\s+(\))/g;
+
+var plugin = {
+ level1: {
+ value: function urlWhitespace(_name, value) {
+ if (!startsAsUrl(value)) {
+ return value;
+ }
+
+ return value
+ .replace(WHITESPACE_PATTERN, '')
+ .replace(WHITESPACE_PREFIX_PATTERN, '$1')
+ .replace(WHITESPACE_SUFFIX_PATTERN, '$1');
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 1229:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var Marker = __webpack_require__(2638);
+
+var CALC_DIVISION_WHITESPACE_PATTERN = /\) ?\/ ?/g;
+var COMMA_AND_SPACE_PATTERN = /, /g;
+var MULTI_WHITESPACE_PATTERN = /\s+/g;
+var FUNCTION_CLOSING_BRACE_WHITESPACE_PATTERN = /\s+(;?\))/g;
+var FUNCTION_OPENING_BRACE_WHITESPACE_PATTERN = /(\(;?)\s+/g;
+
+var plugin = {
+ level1: {
+ value: function whitespace(name, value, options) {
+ if (!options.level[OptimizationLevel.One].removeWhitespace) {
+ return value;
+ }
+
+ if (value.indexOf(' ') == -1 || value.indexOf('expression') === 0) {
+ return value;
+ }
+
+ if (value.indexOf(Marker.SINGLE_QUOTE) > -1 || value.indexOf(Marker.DOUBLE_QUOTE) > -1) {
+ return value;
+ }
+
+ value = value.replace(MULTI_WHITESPACE_PATTERN, ' ');
+
+ if (value.indexOf('calc') > -1) {
+ value = value.replace(CALC_DIVISION_WHITESPACE_PATTERN, ')/ ');
+ }
+
+ return value
+ .replace(FUNCTION_OPENING_BRACE_WHITESPACE_PATTERN, '$1')
+ .replace(FUNCTION_CLOSING_BRACE_WHITESPACE_PATTERN, '$1')
+ .replace(COMMA_AND_SPACE_PATTERN, ',');
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 8283:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var split = __webpack_require__(8794);
+
+var ANY_FUNCTION_PATTERN = /^(\-(?:moz|ms|o|webkit)\-[a-z\-]+|[a-z\-]+)\((.+)\)$/;
+var SKIP_FUNCTION_PATTERN = /^(?:\-moz\-calc|\-webkit\-calc|calc|rgb|hsl|rgba|hsla|min|max|clamp|expression)\(/;
+var TOKEN_SEPARATOR_PATTERN = /([\s,\/])/;
+
+function removeRecursively(value, options) {
+ var functionTokens;
+ var tokens;
+
+ if (SKIP_FUNCTION_PATTERN.test(value)) {
+ return value;
+ }
+
+ functionTokens = ANY_FUNCTION_PATTERN.exec(value);
+
+ if (!functionTokens) {
+ return removeZeros(value, options);
+ }
+
+ tokens = split(functionTokens[2], TOKEN_SEPARATOR_PATTERN)
+ .map(function (token) { return removeRecursively(token, options); });
+
+ return functionTokens[1] + '(' + tokens.join('') + ')';
+}
+
+function removeZeros(value, options) {
+ return value
+ .replace(options.unitsRegexp, '$1' + '0' + '$2')
+ .replace(options.unitsRegexp, '$1' + '0' + '$2');
+}
+
+var plugin = {
+ level1: {
+ value: function zero(name, value, options) {
+ if (!options.compatibility.properties.zeroUnits) {
+ return value;
+ }
+
+ if (value.indexOf('%') > 0 && (name == 'height' || name == 'max-height' || name == 'width' || name == 'max-width')) {
+ return value;
+ }
+
+ return removeRecursively(value, options);
+ }
+ }
+};
+
+module.exports = plugin;
+
+
+/***/ }),
+
+/***/ 9123:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+// This extractor is used in level 2 optimizations
+// IMPORTANT: Mind Token class and this code is not related!
+// Properties will be tokenized in one step, see #429
+
+var Token = __webpack_require__(7298);
+var serializeRules = __webpack_require__(5327).rules;
+var serializeValue = __webpack_require__(5327).value;
+
+function extractProperties(token) {
+ var properties = [];
+ var inSpecificSelector;
+ var property;
+ var name;
+ var value;
+ var i, l;
+
+ if (token[0] == Token.RULE) {
+ inSpecificSelector = !/[\.\+>~]/.test(serializeRules(token[1]));
+
+ for (i = 0, l = token[2].length; i < l; i++) {
+ property = token[2][i];
+
+ if (property[0] != Token.PROPERTY)
+ continue;
+
+ name = property[1][1];
+ if (name.length === 0)
+ continue;
+
+ value = serializeValue(property, i);
+
+ properties.push([
+ name,
+ value,
+ findNameRoot(name),
+ token[2][i],
+ name + ':' + value,
+ token[1],
+ inSpecificSelector
+ ]);
+ }
+ } else if (token[0] == Token.NESTED_BLOCK) {
+ for (i = 0, l = token[2].length; i < l; i++) {
+ properties = properties.concat(extractProperties(token[2][i]));
+ }
+ }
+
+ return properties;
+}
+
+function findNameRoot(name) {
+ if (name == 'list-style')
+ return name;
+ if (name.indexOf('-radius') > 0)
+ return 'border-radius';
+ if (name == 'border-collapse' || name == 'border-spacing' || name == 'border-image')
+ return name;
+ if (name.indexOf('border-') === 0 && /^border\-\w+\-\w+$/.test(name))
+ return name.match(/border\-\w+/)[0];
+ if (name.indexOf('border-') === 0 && /^border\-\w+$/.test(name))
+ return 'border';
+ if (name.indexOf('text-') === 0)
+ return name;
+ if (name == '-chrome-')
+ return name;
+
+ return name.replace(/^\-\w+\-/, '').match(/([a-zA-Z]+)/)[0].toLowerCase();
+}
+
+module.exports = extractProperties;
+
+
+/***/ }),
+
+/***/ 1828:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Marker = __webpack_require__(2638);
+var split = __webpack_require__(8794);
+
+var DEEP_SELECTOR_PATTERN = /\/deep\//;
+var DOUBLE_COLON_PATTERN = /^::/;
+var VENDOR_PREFIXED_PATTERN = /:(-moz-|-ms-|-o-|-webkit-)/;
+
+var NOT_PSEUDO = ':not';
+var PSEUDO_CLASSES_WITH_ARGUMENTS = [
+ ':dir',
+ ':lang',
+ ':not',
+ ':nth-child',
+ ':nth-last-child',
+ ':nth-last-of-type',
+ ':nth-of-type'
+];
+var RELATION_PATTERN = /[>\+~]/;
+var UNMIXABLE_PSEUDO_CLASSES = [
+ ':after',
+ ':before',
+ ':first-letter',
+ ':first-line',
+ ':lang'
+];
+var UNMIXABLE_PSEUDO_ELEMENTS = [
+ '::after',
+ '::before',
+ '::first-letter',
+ '::first-line'
+];
+
+var Level = {
+ DOUBLE_QUOTE: 'double-quote',
+ SINGLE_QUOTE: 'single-quote',
+ ROOT: 'root'
+};
+
+function isMergeable(selector, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) {
+ var singleSelectors = split(selector, Marker.COMMA);
+ var singleSelector;
+ var i, l;
+
+ for (i = 0, l = singleSelectors.length; i < l; i++) {
+ singleSelector = singleSelectors[i];
+
+ if (singleSelector.length === 0 ||
+ isDeepSelector(singleSelector) ||
+ isVendorPrefixed(singleSelector) ||
+ (singleSelector.indexOf(Marker.COLON) > -1 && !areMergeable(singleSelector, extractPseudoFrom(singleSelector), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging))) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function isDeepSelector(selector) {
+ return DEEP_SELECTOR_PATTERN.test(selector);
+}
+
+function isVendorPrefixed(selector) {
+ return VENDOR_PREFIXED_PATTERN.test(selector);
+}
+
+function extractPseudoFrom(selector) {
+ var list = [];
+ var character;
+ var buffer = [];
+ var level = Level.ROOT;
+ var roundBracketLevel = 0;
+ var isQuoted;
+ var isEscaped;
+ var isPseudo = false;
+ var isRelation;
+ var wasColon = false;
+ var index;
+ var len;
+
+ for (index = 0, len = selector.length; index < len; index++) {
+ character = selector[index];
+
+ isRelation = !isEscaped && RELATION_PATTERN.test(character);
+ isQuoted = level == Level.DOUBLE_QUOTE || level == Level.SINGLE_QUOTE;
+
+ if (isEscaped) {
+ buffer.push(character);
+ } else if (character == Marker.DOUBLE_QUOTE && level == Level.ROOT) {
+ buffer.push(character);
+ level = Level.DOUBLE_QUOTE;
+ } else if (character == Marker.DOUBLE_QUOTE && level == Level.DOUBLE_QUOTE) {
+ buffer.push(character);
+ level = Level.ROOT;
+ } else if (character == Marker.SINGLE_QUOTE && level == Level.ROOT) {
+ buffer.push(character);
+ level = Level.SINGLE_QUOTE;
+ } else if (character == Marker.SINGLE_QUOTE && level == Level.SINGLE_QUOTE) {
+ buffer.push(character);
+ level = Level.ROOT;
+ } else if (isQuoted) {
+ buffer.push(character);
+ } else if (character == Marker.OPEN_ROUND_BRACKET) {
+ buffer.push(character);
+ roundBracketLevel++;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET && roundBracketLevel == 1 && isPseudo) {
+ buffer.push(character);
+ list.push(buffer.join(''));
+ roundBracketLevel--;
+ buffer = [];
+ isPseudo = false;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET) {
+ buffer.push(character);
+ roundBracketLevel--;
+ } else if (character == Marker.COLON && roundBracketLevel === 0 && isPseudo && !wasColon) {
+ list.push(buffer.join(''));
+ buffer = [];
+ buffer.push(character);
+ } else if (character == Marker.COLON && roundBracketLevel === 0 && !wasColon) {
+ buffer = [];
+ buffer.push(character);
+ isPseudo = true;
+ } else if (character == Marker.SPACE && roundBracketLevel === 0 && isPseudo) {
+ list.push(buffer.join(''));
+ buffer = [];
+ isPseudo = false;
+ } else if (isRelation && roundBracketLevel === 0 && isPseudo) {
+ list.push(buffer.join(''));
+ buffer = [];
+ isPseudo = false;
+ } else {
+ buffer.push(character);
+ }
+
+ isEscaped = character == Marker.BACK_SLASH;
+ wasColon = character == Marker.COLON;
+ }
+
+ if (buffer.length > 0 && isPseudo) {
+ list.push(buffer.join(''));
+ }
+
+ return list;
+}
+
+function areMergeable(selector, matches, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) {
+ return areAllowed(matches, mergeablePseudoClasses, mergeablePseudoElements) &&
+ needArguments(matches) &&
+ (matches.length < 2 || !someIncorrectlyChained(selector, matches)) &&
+ (matches.length < 2 || multiplePseudoMerging && allMixable(matches));
+}
+
+function areAllowed(matches, mergeablePseudoClasses, mergeablePseudoElements) {
+ var match;
+ var name;
+ var i, l;
+
+ for (i = 0, l = matches.length; i < l; i++) {
+ match = matches[i];
+ name = match.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ?
+ match.substring(0, match.indexOf(Marker.OPEN_ROUND_BRACKET)) :
+ match;
+
+ if (mergeablePseudoClasses.indexOf(name) === -1 && mergeablePseudoElements.indexOf(name) === -1) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function needArguments(matches) {
+ var match;
+ var name;
+ var bracketOpensAt;
+ var hasArguments;
+ var i, l;
+
+ for (i = 0, l = matches.length; i < l; i++) {
+ match = matches[i];
+
+ bracketOpensAt = match.indexOf(Marker.OPEN_ROUND_BRACKET);
+ hasArguments = bracketOpensAt > -1;
+ name = hasArguments ?
+ match.substring(0, bracketOpensAt) :
+ match;
+
+ if (hasArguments && PSEUDO_CLASSES_WITH_ARGUMENTS.indexOf(name) == -1) {
+ return false;
+ }
+
+ if (!hasArguments && PSEUDO_CLASSES_WITH_ARGUMENTS.indexOf(name) > -1) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function someIncorrectlyChained(selector, matches) {
+ var positionInSelector = 0;
+ var match;
+ var matchAt;
+ var nextMatch;
+ var nextMatchAt;
+ var name;
+ var nextName;
+ var areChained;
+ var i, l;
+
+ for (i = 0, l = matches.length; i < l; i++) {
+ match = matches[i];
+ nextMatch = matches[i + 1];
+
+ if (!nextMatch) {
+ break;
+ }
+
+ matchAt = selector.indexOf(match, positionInSelector);
+ nextMatchAt = selector.indexOf(match, matchAt + 1);
+ positionInSelector = nextMatchAt;
+ areChained = matchAt + match.length == nextMatchAt;
+
+ if (areChained) {
+ name = match.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ?
+ match.substring(0, match.indexOf(Marker.OPEN_ROUND_BRACKET)) :
+ match;
+ nextName = nextMatch.indexOf(Marker.OPEN_ROUND_BRACKET) > -1 ?
+ nextMatch.substring(0, nextMatch.indexOf(Marker.OPEN_ROUND_BRACKET)) :
+ nextMatch;
+
+ if (name != NOT_PSEUDO || nextName != NOT_PSEUDO) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+function allMixable(matches) {
+ var unmixableMatches = 0;
+ var match;
+ var i, l;
+
+ for (i = 0, l = matches.length; i < l; i++) {
+ match = matches[i];
+
+ if (isPseudoElement(match)) {
+ unmixableMatches += UNMIXABLE_PSEUDO_ELEMENTS.indexOf(match) > -1 ? 1 : 0;
+ } else {
+ unmixableMatches += UNMIXABLE_PSEUDO_CLASSES.indexOf(match) > -1 ? 1 : 0;
+ }
+
+ if (unmixableMatches > 1) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function isPseudoElement(pseudo) {
+ return DOUBLE_COLON_PATTERN.test(pseudo);
+}
+
+module.exports = isMergeable;
+
+
+/***/ }),
+
+/***/ 3164:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var isMergeable = __webpack_require__(1828);
+
+var optimizeProperties = __webpack_require__(8349);
+
+var sortSelectors = __webpack_require__(4290);
+var tidyRules = __webpack_require__(2569);
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var serializeBody = __webpack_require__(5327).body;
+var serializeRules = __webpack_require__(5327).rules;
+
+var Token = __webpack_require__(7298);
+
+function mergeAdjacent(tokens, context) {
+ var lastToken = [null, [], []];
+ var options = context.options;
+ var adjacentSpace = options.compatibility.selectors.adjacentSpace;
+ var selectorsSortingMethod = options.level[OptimizationLevel.One].selectorsSortingMethod;
+ var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
+ var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
+ var mergeLimit = options.compatibility.selectors.mergeLimit;
+ var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
+
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ var token = tokens[i];
+
+ if (token[0] != Token.RULE) {
+ lastToken = [null, [], []];
+ continue;
+ }
+
+ if (lastToken[0] == Token.RULE && serializeRules(token[1]) == serializeRules(lastToken[1])) {
+ Array.prototype.push.apply(lastToken[2], token[2]);
+ optimizeProperties(lastToken[2], true, true, context);
+ token[2] = [];
+ } else if (lastToken[0] == Token.RULE && serializeBody(token[2]) == serializeBody(lastToken[2]) &&
+ isMergeable(serializeRules(token[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&
+ isMergeable(serializeRules(lastToken[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&
+ lastToken[1].length < mergeLimit) {
+ lastToken[1] = tidyRules(lastToken[1].concat(token[1]), false, adjacentSpace, false, context.warnings);
+ lastToken[1] = lastToken.length > 1 ? sortSelectors(lastToken[1], selectorsSortingMethod) : lastToken[1];
+ token[2] = [];
+ } else {
+ lastToken = token;
+ }
+ }
+}
+
+module.exports = mergeAdjacent;
+
+
+/***/ }),
+
+/***/ 5312:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var canReorder = __webpack_require__(9244).canReorder;
+var canReorderSingle = __webpack_require__(9244).canReorderSingle;
+var extractProperties = __webpack_require__(9123);
+var rulesOverlap = __webpack_require__(9066);
+
+var serializeRules = __webpack_require__(5327).rules;
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+var Token = __webpack_require__(7298);
+
+function mergeMediaQueries(tokens, context) {
+ var mergeSemantically = context.options.level[OptimizationLevel.Two].mergeSemantically;
+ var specificityCache = context.cache.specificity;
+ var candidates = {};
+ var reduced = [];
+
+ for (var i = tokens.length - 1; i >= 0; i--) {
+ var token = tokens[i];
+ if (token[0] != Token.NESTED_BLOCK) {
+ continue;
+ }
+
+ var key = serializeRules(token[1]);
+ var candidate = candidates[key];
+ if (!candidate) {
+ candidate = [];
+ candidates[key] = candidate;
+ }
+
+ candidate.push(i);
+ }
+
+ for (var name in candidates) {
+ var positions = candidates[name];
+
+ positionLoop:
+ for (var j = positions.length - 1; j > 0; j--) {
+ var positionOne = positions[j];
+ var tokenOne = tokens[positionOne];
+ var positionTwo = positions[j - 1];
+ var tokenTwo = tokens[positionTwo];
+
+ directionLoop:
+ for (var direction = 1; direction >= -1; direction -= 2) {
+ var topToBottom = direction == 1;
+ var from = topToBottom ? positionOne + 1 : positionTwo - 1;
+ var to = topToBottom ? positionTwo : positionOne;
+ var delta = topToBottom ? 1 : -1;
+ var source = topToBottom ? tokenOne : tokenTwo;
+ var target = topToBottom ? tokenTwo : tokenOne;
+ var movedProperties = extractProperties(source);
+
+ while (from != to) {
+ var traversedProperties = extractProperties(tokens[from]);
+ from += delta;
+
+ if (mergeSemantically && allSameRulePropertiesCanBeReordered(movedProperties, traversedProperties, specificityCache)) {
+ continue;
+ }
+
+ if (!canReorder(movedProperties, traversedProperties, specificityCache))
+ continue directionLoop;
+ }
+
+ target[2] = topToBottom ?
+ source[2].concat(target[2]) :
+ target[2].concat(source[2]);
+ source[2] = [];
+
+ reduced.push(target);
+ continue positionLoop;
+ }
+ }
+ }
+
+ return reduced;
+}
+
+function allSameRulePropertiesCanBeReordered(movedProperties, traversedProperties, specificityCache) {
+ var movedProperty;
+ var movedRule;
+ var traversedProperty;
+ var traversedRule;
+ var i, l;
+ var j, m;
+
+ for (i = 0, l = movedProperties.length; i < l; i++) {
+ movedProperty = movedProperties[i];
+ movedRule = movedProperty[5];
+
+ for (j = 0, m = traversedProperties.length; j < m; j++) {
+ traversedProperty = traversedProperties[j];
+ traversedRule = traversedProperty[5];
+
+ if (rulesOverlap(movedRule, traversedRule, true) && !canReorderSingle(movedProperty, traversedProperty, specificityCache)) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+module.exports = mergeMediaQueries;
+
+
+/***/ }),
+
+/***/ 4197:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var isMergeable = __webpack_require__(1828);
+
+var sortSelectors = __webpack_require__(4290);
+var tidyRules = __webpack_require__(2569);
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var serializeBody = __webpack_require__(5327).body;
+var serializeRules = __webpack_require__(5327).rules;
+
+var Token = __webpack_require__(7298);
+
+function unsafeSelector(value) {
+ return /\.|\*| :/.test(value);
+}
+
+function isBemElement(token) {
+ var asString = serializeRules(token[1]);
+ return asString.indexOf('__') > -1 || asString.indexOf('--') > -1;
+}
+
+function withoutModifier(selector) {
+ return selector.replace(/--[^ ,>\+~:]+/g, '');
+}
+
+function removeAnyUnsafeElements(left, candidates) {
+ var leftSelector = withoutModifier(serializeRules(left[1]));
+
+ for (var body in candidates) {
+ var right = candidates[body];
+ var rightSelector = withoutModifier(serializeRules(right[1]));
+
+ if (rightSelector.indexOf(leftSelector) > -1 || leftSelector.indexOf(rightSelector) > -1)
+ delete candidates[body];
+ }
+}
+
+function mergeNonAdjacentByBody(tokens, context) {
+ var options = context.options;
+ var mergeSemantically = options.level[OptimizationLevel.Two].mergeSemantically;
+ var adjacentSpace = options.compatibility.selectors.adjacentSpace;
+ var selectorsSortingMethod = options.level[OptimizationLevel.One].selectorsSortingMethod;
+ var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
+ var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
+ var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
+ var candidates = {};
+
+ for (var i = tokens.length - 1; i >= 0; i--) {
+ var token = tokens[i];
+ if (token[0] != Token.RULE)
+ continue;
+
+ if (token[2].length > 0 && (!mergeSemantically && unsafeSelector(serializeRules(token[1]))))
+ candidates = {};
+
+ if (token[2].length > 0 && mergeSemantically && isBemElement(token))
+ removeAnyUnsafeElements(token, candidates);
+
+ var candidateBody = serializeBody(token[2]);
+ var oldToken = candidates[candidateBody];
+ if (oldToken &&
+ isMergeable(serializeRules(token[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) &&
+ isMergeable(serializeRules(oldToken[1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging)) {
+
+ if (token[2].length > 0) {
+ token[1] = tidyRules(oldToken[1].concat(token[1]), false, adjacentSpace, false, context.warnings);
+ token[1] = token[1].length > 1 ? sortSelectors(token[1], selectorsSortingMethod) : token[1];
+ } else {
+ token[1] = oldToken[1].concat(token[1]);
+ }
+
+ oldToken[2] = [];
+ candidates[candidateBody] = null;
+ }
+
+ candidates[serializeBody(token[2])] = token;
+ }
+}
+
+module.exports = mergeNonAdjacentByBody;
+
+
+/***/ }),
+
+/***/ 1812:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var canReorder = __webpack_require__(9244).canReorder;
+var extractProperties = __webpack_require__(9123);
+
+var optimizeProperties = __webpack_require__(8349);
+
+var serializeRules = __webpack_require__(5327).rules;
+
+var Token = __webpack_require__(7298);
+
+function mergeNonAdjacentBySelector(tokens, context) {
+ var specificityCache = context.cache.specificity;
+ var allSelectors = {};
+ var repeatedSelectors = [];
+ var i;
+
+ for (i = tokens.length - 1; i >= 0; i--) {
+ if (tokens[i][0] != Token.RULE)
+ continue;
+ if (tokens[i][2].length === 0)
+ continue;
+
+ var selector = serializeRules(tokens[i][1]);
+ allSelectors[selector] = [i].concat(allSelectors[selector] || []);
+
+ if (allSelectors[selector].length == 2)
+ repeatedSelectors.push(selector);
+ }
+
+ for (i = repeatedSelectors.length - 1; i >= 0; i--) {
+ var positions = allSelectors[repeatedSelectors[i]];
+
+ selectorIterator:
+ for (var j = positions.length - 1; j > 0; j--) {
+ var positionOne = positions[j - 1];
+ var tokenOne = tokens[positionOne];
+ var positionTwo = positions[j];
+ var tokenTwo = tokens[positionTwo];
+
+ directionIterator:
+ for (var direction = 1; direction >= -1; direction -= 2) {
+ var topToBottom = direction == 1;
+ var from = topToBottom ? positionOne + 1 : positionTwo - 1;
+ var to = topToBottom ? positionTwo : positionOne;
+ var delta = topToBottom ? 1 : -1;
+ var moved = topToBottom ? tokenOne : tokenTwo;
+ var target = topToBottom ? tokenTwo : tokenOne;
+ var movedProperties = extractProperties(moved);
+
+ while (from != to) {
+ var traversedProperties = extractProperties(tokens[from]);
+ from += delta;
+
+ // traversed then moved as we move selectors towards the start
+ var reorderable = topToBottom ?
+ canReorder(movedProperties, traversedProperties, specificityCache) :
+ canReorder(traversedProperties, movedProperties, specificityCache);
+
+ if (!reorderable && !topToBottom)
+ continue selectorIterator;
+ if (!reorderable && topToBottom)
+ continue directionIterator;
+ }
+
+ if (topToBottom) {
+ Array.prototype.push.apply(moved[2], target[2]);
+ target[2] = moved[2];
+ } else {
+ Array.prototype.push.apply(target[2], moved[2]);
+ }
+
+ optimizeProperties(target[2], true, true, context);
+ moved[2] = [];
+ }
+ }
+ }
+}
+
+module.exports = mergeNonAdjacentBySelector;
+
+
+/***/ }),
+
+/***/ 421:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var mergeAdjacent = __webpack_require__(3164);
+var mergeMediaQueries = __webpack_require__(5312);
+var mergeNonAdjacentByBody = __webpack_require__(4197);
+var mergeNonAdjacentBySelector = __webpack_require__(1812);
+var reduceNonAdjacent = __webpack_require__(1324);
+var removeDuplicateFontAtRules = __webpack_require__(6031);
+var removeDuplicateMediaQueries = __webpack_require__(3920);
+var removeDuplicates = __webpack_require__(195);
+var removeUnusedAtRules = __webpack_require__(2608);
+var restructure = __webpack_require__(4607);
+
+var optimizeProperties = __webpack_require__(8349);
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+var Token = __webpack_require__(7298);
+
+function removeEmpty(tokens) {
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ var token = tokens[i];
+ var isEmpty = false;
+
+ switch (token[0]) {
+ case Token.RULE:
+ isEmpty = token[1].length === 0 || token[2].length === 0;
+ break;
+ case Token.NESTED_BLOCK:
+ removeEmpty(token[2]);
+ isEmpty = token[2].length === 0;
+ break;
+ case Token.AT_RULE:
+ isEmpty = token[1].length === 0;
+ break;
+ case Token.AT_RULE_BLOCK:
+ isEmpty = token[2].length === 0;
+ }
+
+ if (isEmpty) {
+ tokens.splice(i, 1);
+ i--;
+ l--;
+ }
+ }
+}
+
+function recursivelyOptimizeBlocks(tokens, context) {
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ var token = tokens[i];
+
+ if (token[0] == Token.NESTED_BLOCK) {
+ var isKeyframes = /@(-moz-|-o-|-webkit-)?keyframes/.test(token[1][0][1]);
+ level2Optimize(token[2], context, !isKeyframes);
+ }
+ }
+}
+
+function recursivelyOptimizeProperties(tokens, context) {
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ var token = tokens[i];
+
+ switch (token[0]) {
+ case Token.RULE:
+ optimizeProperties(token[2], true, true, context);
+ break;
+ case Token.NESTED_BLOCK:
+ recursivelyOptimizeProperties(token[2], context);
+ }
+ }
+}
+
+function level2Optimize(tokens, context, withRestructuring) {
+ var levelOptions = context.options.level[OptimizationLevel.Two];
+ var level2Plugins = context.options.plugins.level2Block;
+ var reduced;
+ var i;
+
+ recursivelyOptimizeBlocks(tokens, context);
+ recursivelyOptimizeProperties(tokens, context);
+
+ if (levelOptions.removeDuplicateRules) {
+ removeDuplicates(tokens, context);
+ }
+
+ if (levelOptions.mergeAdjacentRules) {
+ mergeAdjacent(tokens, context);
+ }
+
+ if (levelOptions.reduceNonAdjacentRules) {
+ reduceNonAdjacent(tokens, context);
+ }
+
+ if (levelOptions.mergeNonAdjacentRules && levelOptions.mergeNonAdjacentRules != 'body') {
+ mergeNonAdjacentBySelector(tokens, context);
+ }
+
+ if (levelOptions.mergeNonAdjacentRules && levelOptions.mergeNonAdjacentRules != 'selector') {
+ mergeNonAdjacentByBody(tokens, context);
+ }
+
+ if (levelOptions.restructureRules && levelOptions.mergeAdjacentRules && withRestructuring) {
+ restructure(tokens, context);
+ mergeAdjacent(tokens, context);
+ }
+
+ if (levelOptions.restructureRules && !levelOptions.mergeAdjacentRules && withRestructuring) {
+ restructure(tokens, context);
+ }
+
+ if (levelOptions.removeDuplicateFontRules) {
+ removeDuplicateFontAtRules(tokens, context);
+ }
+
+ if (levelOptions.removeDuplicateMediaBlocks) {
+ removeDuplicateMediaQueries(tokens, context);
+ }
+
+ if (levelOptions.removeUnusedAtRules) {
+ removeUnusedAtRules(tokens, context);
+ }
+
+ if (levelOptions.mergeMedia) {
+ reduced = mergeMediaQueries(tokens, context);
+ for (i = reduced.length - 1; i >= 0; i--) {
+ level2Optimize(reduced[i][2], context, false);
+ }
+ }
+
+ for (i = 0; i < level2Plugins.length; i++) {
+ level2Plugins[i](tokens);
+ }
+
+ if (levelOptions.removeEmpty) {
+ removeEmpty(tokens);
+ }
+
+ return tokens;
+}
+
+module.exports = level2Optimize;
+
+
+/***/ }),
+
+/***/ 57:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Marker = __webpack_require__(2638);
+
+function everyValuesPair(fn, left, right) {
+ var leftSize = left.value.length;
+ var rightSize = right.value.length;
+ var total = Math.max(leftSize, rightSize);
+ var lowerBound = Math.min(leftSize, rightSize) - 1;
+ var leftValue;
+ var rightValue;
+ var position;
+
+ for (position = 0; position < total; position++) {
+ leftValue = left.value[position] && left.value[position][1] || leftValue;
+ rightValue = right.value[position] && right.value[position][1] || rightValue;
+
+ if (leftValue == Marker.COMMA || rightValue == Marker.COMMA) {
+ continue;
+ }
+
+ if (!fn(leftValue, rightValue, position, position <= lowerBound)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+module.exports = everyValuesPair;
+
+
+/***/ }),
+
+/***/ 1891:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var configuration = __webpack_require__(2341);
+
+function findComponentIn(shorthand, longhand) {
+ var comparator = nameComparator(longhand);
+
+ return findInDirectComponents(shorthand, comparator) || findInSubComponents(shorthand, comparator);
+}
+
+function nameComparator(to) {
+ return function (property) {
+ return to.name === property.name;
+ };
+}
+
+function findInDirectComponents(shorthand, comparator) {
+ return shorthand.components.filter(comparator)[0];
+}
+
+function findInSubComponents(shorthand, comparator) {
+ var shorthandComponent;
+ var longhandMatch;
+ var i, l;
+
+ if (!configuration[shorthand.name].shorthandComponents) {
+ return;
+ }
+
+ for (i = 0, l = shorthand.components.length; i < l; i++) {
+ shorthandComponent = shorthand.components[i];
+ longhandMatch = findInDirectComponents(shorthandComponent, comparator);
+
+ if (longhandMatch) {
+ return longhandMatch;
+ }
+ }
+
+ return;
+}
+
+module.exports = findComponentIn;
+
+
+/***/ }),
+
+/***/ 1515:
+/***/ ((module) => {
+
+function hasInherit(property) {
+ for (var i = property.value.length - 1; i >= 0; i--) {
+ if (property.value[i][1] == 'inherit')
+ return true;
+ }
+
+ return false;
+}
+
+module.exports = hasInherit;
+
+
+/***/ }),
+
+/***/ 5719:
+/***/ ((module) => {
+
+function hasSameValues(property) {
+ var firstValue = property.value[0][1];
+ var i, l;
+
+ for (i = 1, l = property.value.length; i < l; i++) {
+ if (property.value[i][1] != firstValue) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+module.exports = hasSameValues;
+
+
+/***/ }),
+
+/***/ 1060:
+/***/ ((module) => {
+
+function hasUnset(property) {
+ for (var i = property.value.length - 1; i >= 0; i--) {
+ if (property.value[i][1] == 'unset')
+ return true;
+ }
+
+ return false;
+}
+
+module.exports = hasUnset;
+
+
+/***/ }),
+
+/***/ 9167:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var configuration = __webpack_require__(2341);
+
+function isComponentOf(property1, property2, shallow) {
+ return isDirectComponentOf(property1, property2) ||
+ !shallow && !!configuration[property1.name].shorthandComponents && isSubComponentOf(property1, property2);
+}
+
+function isDirectComponentOf(property1, property2) {
+ var descriptor = configuration[property1.name];
+
+ return 'components' in descriptor && descriptor.components.indexOf(property2.name) > -1;
+}
+
+function isSubComponentOf(property1, property2) {
+ return property1
+ .components
+ .some(function (component) {
+ return isDirectComponentOf(component, property2);
+ });
+}
+
+module.exports = isComponentOf;
+
+
+/***/ }),
+
+/***/ 5867:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Marker = __webpack_require__(2638);
+
+function isMergeableShorthand(shorthand) {
+ if (shorthand.name != 'font') {
+ return true;
+ }
+
+ return shorthand.value[0][1].indexOf(Marker.INTERNAL) == -1;
+}
+
+module.exports = isMergeableShorthand;
+
+
+/***/ }),
+
+/***/ 2412:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var everyValuesPair = __webpack_require__(57);
+var hasInherit = __webpack_require__(1515);
+var hasSameValues = __webpack_require__(5719);
+var populateComponents = __webpack_require__(5979);
+
+var configuration = __webpack_require__(2341);
+var deepClone = __webpack_require__(2079).deep;
+var restoreWithComponents = __webpack_require__(6327);
+
+var restoreFromOptimizing = __webpack_require__(4168);
+var wrapSingle = __webpack_require__(4082).single;
+
+var serializeBody = __webpack_require__(5327).body;
+var Token = __webpack_require__(7298);
+
+function mergeIntoShorthands(properties, validator) {
+ var candidates = {};
+ var descriptor;
+ var componentOf;
+ var property;
+ var i, l;
+ var j, m;
+
+ // there is no shorthand property made up of less than 3 longhands
+ if (properties.length < 3) {
+ return;
+ }
+
+ for (i = 0, l = properties.length; i < l; i++) {
+ property = properties[i];
+ descriptor = configuration[property.name];
+
+ if (property.dynamic) {
+ continue;
+ }
+
+ if (property.unused) {
+ continue;
+ }
+
+ if (property.hack) {
+ continue;
+ }
+
+ if (property.block) {
+ continue;
+ }
+
+ if (descriptor && descriptor.singleTypeComponents && !hasSameValues(property)) {
+ continue;
+ }
+
+ invalidateOrCompact(properties, i, candidates, validator);
+
+ if (descriptor && descriptor.componentOf) {
+ for (j = 0, m = descriptor.componentOf.length; j < m; j++) {
+ componentOf = descriptor.componentOf[j];
+
+ candidates[componentOf] = candidates[componentOf] || {};
+ candidates[componentOf][property.name] = property;
+ }
+ }
+ }
+
+ invalidateOrCompact(properties, i, candidates, validator);
+}
+
+function invalidateOrCompact(properties, position, candidates, validator) {
+ var invalidatedBy = properties[position];
+ var shorthandName;
+ var shorthandDescriptor;
+ var candidateComponents;
+ var replacedCandidates = [];
+ var i;
+
+ for (shorthandName in candidates) {
+ if (undefined !== invalidatedBy && shorthandName == invalidatedBy.name) {
+ continue;
+ }
+
+ shorthandDescriptor = configuration[shorthandName];
+ candidateComponents = candidates[shorthandName];
+ if (invalidatedBy && invalidates(candidates, shorthandName, invalidatedBy)) {
+ delete candidates[shorthandName];
+ continue;
+ }
+
+ if (shorthandDescriptor.components.length > Object.keys(candidateComponents).length) {
+ continue;
+ }
+
+ if (mixedImportance(candidateComponents)) {
+ continue;
+ }
+
+ if (!overridable(candidateComponents, shorthandName, validator)) {
+ continue;
+ }
+
+ if (!mergeable(candidateComponents)) {
+ continue;
+ }
+
+ if (mixedInherit(candidateComponents)) {
+ replaceWithInheritBestFit(properties, candidateComponents, shorthandName, validator);
+ } else {
+ replaceWithShorthand(properties, candidateComponents, shorthandName, validator);
+ }
+
+ replacedCandidates.push(shorthandName);
+ }
+
+ for (i = replacedCandidates.length - 1; i >= 0; i--) {
+ delete candidates[replacedCandidates[i]];
+ }
+}
+
+function invalidates(candidates, shorthandName, invalidatedBy) {
+ var shorthandDescriptor = configuration[shorthandName];
+ var invalidatedByDescriptor = configuration[invalidatedBy.name];
+ var componentName;
+
+ if ('overridesShorthands' in shorthandDescriptor && shorthandDescriptor.overridesShorthands.indexOf(invalidatedBy.name) > -1) {
+ return true;
+ }
+
+ if (invalidatedByDescriptor && 'componentOf' in invalidatedByDescriptor) {
+ for (componentName in candidates[shorthandName]) {
+ if (invalidatedByDescriptor.componentOf.indexOf(componentName) > -1) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+function mixedImportance(components) {
+ var important;
+ var componentName;
+
+ for (componentName in components) {
+ if (undefined !== important && components[componentName].important != important) {
+ return true;
+ }
+
+ important = components[componentName].important;
+ }
+
+ return false;
+}
+
+function overridable(components, shorthandName, validator) {
+ var descriptor = configuration[shorthandName];
+ var newValuePlaceholder = [
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, shorthandName],
+ [Token.PROPERTY_VALUE, descriptor.defaultValue]
+ ];
+ var newProperty = wrapSingle(newValuePlaceholder);
+ var component;
+ var mayOverride;
+ var i, l;
+
+ populateComponents([newProperty], validator, []);
+
+ for (i = 0, l = descriptor.components.length; i < l; i++) {
+ component = components[descriptor.components[i]];
+ mayOverride = configuration[component.name].canOverride || sameValue;
+
+ if (!everyValuesPair(mayOverride.bind(null, validator), newProperty.components[i], component)) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function sameValue(_validator, value1, value2) {
+ return value1 === value2;
+}
+
+function mergeable(components) {
+ var lastCount = null;
+ var currentCount;
+ var componentName;
+ var component;
+ var descriptor;
+ var values;
+
+ for (componentName in components) {
+ component = components[componentName];
+ descriptor = configuration[componentName];
+
+ if (!('restore' in descriptor)) {
+ continue;
+ }
+
+ restoreFromOptimizing([component.all[component.position]], restoreWithComponents);
+ values = descriptor.restore(component, configuration);
+
+ currentCount = values.length;
+
+ if (lastCount !== null && currentCount !== lastCount) {
+ return false;
+ }
+
+ lastCount = currentCount;
+ }
+
+ return true;
+}
+
+function mixedInherit(components) {
+ var componentName;
+ var lastValue = null;
+ var currentValue;
+
+ for (componentName in components) {
+ currentValue = hasInherit(components[componentName]);
+
+ if (lastValue !== null && lastValue !== currentValue) {
+ return true;
+ }
+
+ lastValue = currentValue;
+ }
+
+ return false;
+}
+
+function replaceWithInheritBestFit(properties, candidateComponents, shorthandName, validator) {
+ var viaLonghands = buildSequenceWithInheritLonghands(candidateComponents, shorthandName, validator);
+ var viaShorthand = buildSequenceWithInheritShorthand(candidateComponents, shorthandName, validator);
+ var longhandTokensSequence = viaLonghands[0];
+ var shorthandTokensSequence = viaShorthand[0];
+ var isLonghandsShorter = serializeBody(longhandTokensSequence).length < serializeBody(shorthandTokensSequence).length;
+ var newTokensSequence = isLonghandsShorter ? longhandTokensSequence : shorthandTokensSequence;
+ var newProperty = isLonghandsShorter ? viaLonghands[1] : viaShorthand[1];
+ var newComponents = isLonghandsShorter ? viaLonghands[2] : viaShorthand[2];
+ var lastComponent = candidateComponents[Object.keys(candidateComponents).pop()];
+ var all = lastComponent.all;
+ var insertAt = lastComponent.position;
+ var componentName;
+ var oldComponent;
+ var newComponent;
+ var newToken;
+
+ newProperty.position = insertAt;
+ newProperty.shorthand = true;
+ newProperty.important = lastComponent.important;
+ newProperty.multiplex = false;
+ newProperty.dirty = true;
+ newProperty.all = all;
+ newProperty.all[insertAt] = newTokensSequence[0];
+
+ properties.splice(insertAt, 1, newProperty);
+
+ for (componentName in candidateComponents) {
+ oldComponent = candidateComponents[componentName];
+ oldComponent.unused = true;
+
+ newProperty.multiplex = newProperty.multiplex || oldComponent.multiplex;
+
+ if (oldComponent.name in newComponents) {
+ newComponent = newComponents[oldComponent.name];
+ newToken = findTokenIn(newTokensSequence, componentName);
+
+ newComponent.position = all.length;
+ newComponent.all = all;
+ newComponent.all.push(newToken);
+
+ properties.push(newComponent);
+ }
+ }
+}
+
+function buildSequenceWithInheritLonghands(components, shorthandName, validator) {
+ var tokensSequence = [];
+ var inheritComponents = {};
+ var nonInheritComponents = {};
+ var descriptor = configuration[shorthandName];
+ var shorthandToken = [
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, shorthandName],
+ [Token.PROPERTY_VALUE, descriptor.defaultValue]
+ ];
+ var newProperty = wrapSingle(shorthandToken);
+ var component;
+ var longhandToken;
+ var newComponent;
+ var nameMetadata;
+ var i, l;
+
+ populateComponents([newProperty], validator, []);
+
+ for (i = 0, l = descriptor.components.length; i < l; i++) {
+ component = components[descriptor.components[i]];
+
+ if (hasInherit(component)) {
+ longhandToken = component.all[component.position].slice(0, 2);
+ Array.prototype.push.apply(longhandToken, component.value);
+ tokensSequence.push(longhandToken);
+
+ newComponent = deepClone(component);
+ newComponent.value = inferComponentValue(components, newComponent.name);
+
+ newProperty.components[i] = newComponent;
+ inheritComponents[component.name] = deepClone(component);
+ } else {
+ newComponent = deepClone(component);
+ newComponent.all = component.all;
+ newProperty.components[i] = newComponent;
+
+ nonInheritComponents[component.name] = component;
+ }
+ }
+
+ newProperty.important = components[Object.keys(components).pop()].important;
+
+ nameMetadata = joinMetadata(nonInheritComponents, 1);
+ shorthandToken[1].push(nameMetadata);
+
+ restoreFromOptimizing([newProperty], restoreWithComponents);
+
+ shorthandToken = shorthandToken.slice(0, 2);
+ Array.prototype.push.apply(shorthandToken, newProperty.value);
+
+ tokensSequence.unshift(shorthandToken);
+
+ return [tokensSequence, newProperty, inheritComponents];
+}
+
+function inferComponentValue(components, propertyName) {
+ var descriptor = configuration[propertyName];
+
+ if ('oppositeTo' in descriptor) {
+ return components[descriptor.oppositeTo].value;
+ } else {
+ return [[Token.PROPERTY_VALUE, descriptor.defaultValue]];
+ }
+}
+
+function joinMetadata(components, at) {
+ var metadata = [];
+ var component;
+ var originalValue;
+ var componentMetadata;
+ var componentName;
+
+ for (componentName in components) {
+ component = components[componentName];
+ originalValue = component.all[component.position];
+ componentMetadata = originalValue[at][originalValue[at].length - 1];
+
+ Array.prototype.push.apply(metadata, componentMetadata);
+ }
+
+ return metadata.sort(metadataSorter);
+}
+
+function metadataSorter(metadata1, metadata2) {
+ var line1 = metadata1[0];
+ var line2 = metadata2[0];
+ var column1 = metadata1[1];
+ var column2 = metadata2[1];
+
+ if (line1 < line2) {
+ return -1;
+ } else if (line1 === line2) {
+ return column1 < column2 ? -1 : 1;
+ } else {
+ return 1;
+ }
+}
+
+function buildSequenceWithInheritShorthand(components, shorthandName, validator) {
+ var tokensSequence = [];
+ var inheritComponents = {};
+ var nonInheritComponents = {};
+ var descriptor = configuration[shorthandName];
+ var shorthandToken = [
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, shorthandName],
+ [Token.PROPERTY_VALUE, 'inherit']
+ ];
+ var newProperty = wrapSingle(shorthandToken);
+ var component;
+ var longhandToken;
+ var nameMetadata;
+ var valueMetadata;
+ var i, l;
+
+ populateComponents([newProperty], validator, []);
+
+ for (i = 0, l = descriptor.components.length; i < l; i++) {
+ component = components[descriptor.components[i]];
+
+ if (hasInherit(component)) {
+ inheritComponents[component.name] = component;
+ } else {
+ longhandToken = component.all[component.position].slice(0, 2);
+ Array.prototype.push.apply(longhandToken, component.value);
+ tokensSequence.push(longhandToken);
+
+ nonInheritComponents[component.name] = deepClone(component);
+ }
+ }
+
+ nameMetadata = joinMetadata(inheritComponents, 1);
+ shorthandToken[1].push(nameMetadata);
+
+ valueMetadata = joinMetadata(inheritComponents, 2);
+ shorthandToken[2].push(valueMetadata);
+
+ tokensSequence.unshift(shorthandToken);
+
+ return [tokensSequence, newProperty, nonInheritComponents];
+}
+
+function findTokenIn(tokens, componentName) {
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ if (tokens[i][1][1] == componentName) {
+ return tokens[i];
+ }
+ }
+}
+
+function replaceWithShorthand(properties, candidateComponents, shorthandName, validator) {
+ var descriptor = configuration[shorthandName];
+ var nameMetadata;
+ var valueMetadata;
+ var newValuePlaceholder = [
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, shorthandName],
+ [Token.PROPERTY_VALUE, descriptor.defaultValue]
+ ];
+ var all;
+ var insertAt = inferInsertAtFrom(properties, candidateComponents, shorthandName);
+
+ var newProperty = wrapSingle(newValuePlaceholder);
+ newProperty.shorthand = true;
+ newProperty.dirty = true;
+ newProperty.multiplex = false;
+
+ populateComponents([newProperty], validator, []);
+
+ for (var i = 0, l = descriptor.components.length; i < l; i++) {
+ var component = candidateComponents[descriptor.components[i]];
+
+ newProperty.components[i] = deepClone(component);
+ newProperty.important = component.important;
+ newProperty.multiplex = newProperty.multiplex || component.multiplex;
+
+ all = component.all;
+ }
+
+ for (var componentName in candidateComponents) {
+ candidateComponents[componentName].unused = true;
+ }
+
+ nameMetadata = joinMetadata(candidateComponents, 1);
+ newValuePlaceholder[1].push(nameMetadata);
+
+ valueMetadata = joinMetadata(candidateComponents, 2);
+ newValuePlaceholder[2].push(valueMetadata);
+
+ newProperty.position = insertAt;
+ newProperty.all = all;
+ newProperty.all[insertAt] = newValuePlaceholder;
+
+ properties.splice(insertAt, 1, newProperty);
+}
+
+function inferInsertAtFrom(properties, candidateComponents, shorthandName) {
+ var candidateComponentNames = Object.keys(candidateComponents);
+ var firstCandidatePosition = candidateComponents[candidateComponentNames[0]].position;
+ var lastCandidatePosition = candidateComponents[candidateComponentNames[candidateComponentNames.length - 1]].position;
+
+ if (shorthandName == 'border' && traversesVia(properties.slice(firstCandidatePosition, lastCandidatePosition), 'border-image')) {
+ return firstCandidatePosition;
+ } else {
+ return lastCandidatePosition;
+ }
+}
+
+function traversesVia(properties, propertyName) {
+ for (var i = properties.length - 1; i >= 0; i--) {
+ if (properties[i].name == propertyName) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+module.exports = mergeIntoShorthands;
+
+
+/***/ }),
+
+/***/ 8349:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var mergeIntoShorthands = __webpack_require__(2412);
+var overrideProperties = __webpack_require__(2883);
+var populateComponents = __webpack_require__(5979);
+
+var restoreWithComponents = __webpack_require__(6327);
+
+var wrapForOptimizing = __webpack_require__(4082).all;
+var removeUnused = __webpack_require__(142);
+var restoreFromOptimizing = __webpack_require__(4168);
+
+var OptimizationLevel = __webpack_require__(722).OptimizationLevel;
+
+function optimizeProperties(properties, withOverriding, withMerging, context) {
+ var levelOptions = context.options.level[OptimizationLevel.Two];
+ var _properties = wrapForOptimizing(properties, levelOptions.skipProperties);
+ var _property;
+ var i, l;
+
+ populateComponents(_properties, context.validator, context.warnings);
+
+ for (i = 0, l = _properties.length; i < l; i++) {
+ _property = _properties[i];
+ if (_property.block) {
+ optimizeProperties(_property.value[0][1], withOverriding, withMerging, context);
+ }
+ }
+
+ if (withMerging && levelOptions.mergeIntoShorthands) {
+ mergeIntoShorthands(_properties, context.validator);
+ }
+
+ if (withOverriding && levelOptions.overrideProperties) {
+ overrideProperties(_properties, withMerging, context.options.compatibility, context.validator);
+ }
+
+ restoreFromOptimizing(_properties, restoreWithComponents);
+ removeUnused(_properties);
+}
+
+module.exports = optimizeProperties;
+
+
+/***/ }),
+
+/***/ 2883:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var hasInherit = __webpack_require__(1515);
+var hasUnset = __webpack_require__(1060);
+var everyValuesPair = __webpack_require__(57);
+var findComponentIn = __webpack_require__(1891);
+var isComponentOf = __webpack_require__(9167);
+var isMergeableShorthand = __webpack_require__(5867);
+var overridesNonComponentShorthand = __webpack_require__(7627);
+var sameVendorPrefixesIn = __webpack_require__(3568).same;
+
+var configuration = __webpack_require__(2341);
+var deepClone = __webpack_require__(2079).deep;
+var restoreWithComponents = __webpack_require__(6327);
+var shallowClone = __webpack_require__(2079).shallow;
+
+var restoreFromOptimizing = __webpack_require__(4168);
+
+var Token = __webpack_require__(7298);
+var Marker = __webpack_require__(2638);
+
+var serializeProperty = __webpack_require__(5327).property;
+
+function sameValue(_validator, value1, value2) {
+ return value1 === value2;
+}
+
+function wouldBreakCompatibility(property, validator) {
+ for (var i = 0; i < property.components.length; i++) {
+ var component = property.components[i];
+ var descriptor = configuration[component.name];
+ var canOverride = descriptor && descriptor.canOverride || sameValue;
+
+ var _component = shallowClone(component);
+ _component.value = [[Token.PROPERTY_VALUE, descriptor.defaultValue]];
+
+ if (!everyValuesPair(canOverride.bind(null, validator), _component, component)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function overrideIntoMultiplex(property, by) {
+ by.unused = true;
+
+ turnIntoMultiplex(by, multiplexSize(property));
+ property.value = by.value;
+}
+
+function overrideByMultiplex(property, by) {
+ by.unused = true;
+ property.multiplex = true;
+ property.value = by.value;
+}
+
+function overrideSimple(property, by) {
+ by.unused = true;
+ property.value = by.value;
+}
+
+function override(property, by) {
+ if (by.multiplex)
+ overrideByMultiplex(property, by);
+ else if (property.multiplex)
+ overrideIntoMultiplex(property, by);
+ else
+ overrideSimple(property, by);
+}
+
+function overrideShorthand(property, by) {
+ by.unused = true;
+
+ for (var i = 0, l = property.components.length; i < l; i++) {
+ override(property.components[i], by.components[i], property.multiplex);
+ }
+}
+
+function turnIntoMultiplex(property, size) {
+ property.multiplex = true;
+
+ if (configuration[property.name].shorthand) {
+ turnShorthandValueIntoMultiplex(property, size);
+ } else {
+ turnLonghandValueIntoMultiplex(property, size);
+ }
+}
+
+function turnShorthandValueIntoMultiplex(property, size) {
+ var component;
+ var i, l;
+
+ for (i = 0, l = property.components.length; i < l; i++) {
+ component = property.components[i];
+
+ if (!component.multiplex) {
+ turnLonghandValueIntoMultiplex(component, size);
+ }
+ }
+}
+
+function turnLonghandValueIntoMultiplex(property, size) {
+ var descriptor = configuration[property.name];
+ var withRealValue = descriptor.intoMultiplexMode == 'real';
+ var withValue = descriptor.intoMultiplexMode == 'real' ?
+ property.value.slice(0) :
+ (descriptor.intoMultiplexMode == 'placeholder' ? descriptor.placeholderValue : descriptor.defaultValue);
+ var i = multiplexSize(property);
+ var j;
+ var m = withValue.length;
+
+ for (; i < size; i++) {
+ property.value.push([Token.PROPERTY_VALUE, Marker.COMMA]);
+
+ if (Array.isArray(withValue)) {
+ for (j = 0; j < m; j++) {
+ property.value.push(withRealValue ? withValue[j] : [Token.PROPERTY_VALUE, withValue[j]]);
+ }
+ } else {
+ property.value.push(withRealValue ? withValue : [Token.PROPERTY_VALUE, withValue]);
+ }
+ }
+}
+
+function multiplexSize(component) {
+ var size = 0;
+
+ for (var i = 0, l = component.value.length; i < l; i++) {
+ if (component.value[i][1] == Marker.COMMA)
+ size++;
+ }
+
+ return size + 1;
+}
+
+function lengthOf(property) {
+ var fakeAsArray = [
+ Token.PROPERTY,
+ [Token.PROPERTY_NAME, property.name]
+ ].concat(property.value);
+ return serializeProperty([fakeAsArray], 0).length;
+}
+
+function moreSameShorthands(properties, startAt, name) {
+ // Since we run the main loop in `compactOverrides` backwards, at this point some
+ // properties may not be marked as unused.
+ // We should consider reverting the order if possible
+ var count = 0;
+
+ for (var i = startAt; i >= 0; i--) {
+ if (properties[i].name == name && !properties[i].unused)
+ count++;
+ if (count > 1)
+ break;
+ }
+
+ return count > 1;
+}
+
+function overridingFunction(shorthand, validator) {
+ for (var i = 0, l = shorthand.components.length; i < l; i++) {
+ if (!anyValue(validator.isUrl, shorthand.components[i]) && anyValue(validator.isFunction, shorthand.components[i])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function anyValue(fn, property) {
+ for (var i = 0, l = property.value.length; i < l; i++) {
+ if (property.value[i][1] == Marker.COMMA)
+ continue;
+
+ if (fn(property.value[i][1]))
+ return true;
+ }
+
+ return false;
+}
+
+function wouldResultInLongerValue(left, right) {
+ if (!left.multiplex && !right.multiplex || left.multiplex && right.multiplex)
+ return false;
+
+ var multiplex = left.multiplex ? left : right;
+ var simple = left.multiplex ? right : left;
+ var component;
+
+ var multiplexClone = deepClone(multiplex);
+ restoreFromOptimizing([multiplexClone], restoreWithComponents);
+
+ var simpleClone = deepClone(simple);
+ restoreFromOptimizing([simpleClone], restoreWithComponents);
+
+ var lengthBefore = lengthOf(multiplexClone) + 1 + lengthOf(simpleClone);
+
+ if (left.multiplex) {
+ component = findComponentIn(multiplexClone, simpleClone);
+ overrideIntoMultiplex(component, simpleClone);
+ } else {
+ component = findComponentIn(simpleClone, multiplexClone);
+ turnIntoMultiplex(simpleClone, multiplexSize(multiplexClone));
+ overrideByMultiplex(component, multiplexClone);
+ }
+
+ restoreFromOptimizing([simpleClone], restoreWithComponents);
+
+ var lengthAfter = lengthOf(simpleClone);
+
+ return lengthBefore <= lengthAfter;
+}
+
+function isCompactable(property) {
+ return property.name in configuration;
+}
+
+function noneOverrideHack(left, right) {
+ return !left.multiplex &&
+ (left.name == 'background' || left.name == 'background-image') &&
+ right.multiplex &&
+ (right.name == 'background' || right.name == 'background-image') &&
+ anyLayerIsNone(right.value);
+}
+
+function anyLayerIsNone(values) {
+ var layers = intoLayers(values);
+
+ for (var i = 0, l = layers.length; i < l; i++) {
+ if (layers[i].length == 1 && layers[i][0][1] == 'none')
+ return true;
+ }
+
+ return false;
+}
+
+function intoLayers(values) {
+ var layers = [];
+
+ for (var i = 0, layer = [], l = values.length; i < l; i++) {
+ var value = values[i];
+ if (value[1] == Marker.COMMA) {
+ layers.push(layer);
+ layer = [];
+ } else {
+ layer.push(value);
+ }
+ }
+
+ layers.push(layer);
+ return layers;
+}
+
+function overrideProperties(properties, withMerging, compatibility, validator) {
+ var mayOverride, right, left, component;
+ var overriddenComponents;
+ var overriddenComponent;
+ var overridingComponent;
+ var overridable;
+ var i, j, k;
+
+ propertyLoop:
+ for (i = properties.length - 1; i >= 0; i--) {
+ right = properties[i];
+
+ if (!isCompactable(right))
+ continue;
+
+ if (right.block)
+ continue;
+
+ mayOverride = configuration[right.name].canOverride || sameValue;
+
+ traverseLoop:
+ for (j = i - 1; j >= 0; j--) {
+ left = properties[j];
+
+ if (!isCompactable(left))
+ continue;
+
+ if (left.block)
+ continue;
+
+ if (left.dynamic || right.dynamic)
+ continue;
+
+ if (left.unused || right.unused)
+ continue;
+
+ if (left.hack && !right.hack && !right.important || !left.hack && !left.important && right.hack)
+ continue;
+
+ if (left.important == right.important && left.hack[0] != right.hack[0])
+ continue;
+
+ if (left.important == right.important && (left.hack[0] != right.hack[0] || (left.hack[1] && left.hack[1] != right.hack[1])))
+ continue;
+
+ if (hasInherit(right))
+ continue;
+
+ if (noneOverrideHack(left, right))
+ continue;
+
+ if (right.shorthand && isComponentOf(right, left)) {
+ // maybe `left` can be overridden by `right` which is a shorthand?
+ if (!right.important && left.important)
+ continue;
+
+ if (!sameVendorPrefixesIn([left], right.components))
+ continue;
+
+ if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator))
+ continue;
+
+ if (!isMergeableShorthand(right)) {
+ left.unused = true;
+ continue;
+ }
+
+ component = findComponentIn(right, left);
+ mayOverride = configuration[left.name].canOverride || sameValue;
+ if (everyValuesPair(mayOverride.bind(null, validator), left, component)) {
+ left.unused = true;
+ }
+ } else if (right.shorthand && overridesNonComponentShorthand(right, left)) {
+ // `right` is a shorthand while `left` can be overriden by it, think `border` and `border-top`
+ if (!right.important && left.important) {
+ continue;
+ }
+
+ if (!sameVendorPrefixesIn([left], right.components)) {
+ continue;
+ }
+
+ if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator)) {
+ continue;
+ }
+
+ overriddenComponents = left.shorthand ?
+ left.components:
+ [left];
+
+ for (k = overriddenComponents.length - 1; k >= 0; k--) {
+ overriddenComponent = overriddenComponents[k];
+ overridingComponent = findComponentIn(right, overriddenComponent);
+ mayOverride = configuration[overriddenComponent.name].canOverride || sameValue;
+
+ if (!everyValuesPair(mayOverride.bind(null, validator), left, overridingComponent)) {
+ continue traverseLoop;
+ }
+ }
+
+ left.unused = true;
+ } else if (withMerging && left.shorthand && !right.shorthand && isComponentOf(left, right, true)) {
+ // maybe `right` can be pulled into `left` which is a shorthand?
+ if (right.important && !left.important)
+ continue;
+
+ if (!right.important && left.important) {
+ right.unused = true;
+ continue;
+ }
+
+ // Pending more clever algorithm in #527
+ if (moreSameShorthands(properties, i - 1, left.name))
+ continue;
+
+ if (overridingFunction(left, validator))
+ continue;
+
+ if (!isMergeableShorthand(left))
+ continue;
+
+ if (hasUnset(left) || hasUnset(right))
+ continue;
+
+ component = findComponentIn(left, right);
+ if (everyValuesPair(mayOverride.bind(null, validator), component, right)) {
+ var disabledBackgroundMerging =
+ !compatibility.properties.backgroundClipMerging && component.name.indexOf('background-clip') > -1 ||
+ !compatibility.properties.backgroundOriginMerging && component.name.indexOf('background-origin') > -1 ||
+ !compatibility.properties.backgroundSizeMerging && component.name.indexOf('background-size') > -1;
+ var nonMergeableValue = configuration[right.name].nonMergeableValue === right.value[0][1];
+
+ if (disabledBackgroundMerging || nonMergeableValue)
+ continue;
+
+ if (!compatibility.properties.merging && wouldBreakCompatibility(left, validator))
+ continue;
+
+ if (component.value[0][1] != right.value[0][1] && (hasInherit(left) || hasInherit(right)))
+ continue;
+
+ if (wouldResultInLongerValue(left, right))
+ continue;
+
+ if (!left.multiplex && right.multiplex)
+ turnIntoMultiplex(left, multiplexSize(right));
+
+ override(component, right);
+ left.dirty = true;
+ }
+ } else if (withMerging && left.shorthand && right.shorthand && left.name == right.name) {
+ // merge if all components can be merged
+
+ if (!left.multiplex && right.multiplex)
+ continue;
+
+ if (!right.important && left.important) {
+ right.unused = true;
+ continue propertyLoop;
+ }
+
+ if (right.important && !left.important) {
+ left.unused = true;
+ continue;
+ }
+
+ if (!isMergeableShorthand(right)) {
+ left.unused = true;
+ continue;
+ }
+
+ for (k = left.components.length - 1; k >= 0; k--) {
+ var leftComponent = left.components[k];
+ var rightComponent = right.components[k];
+
+ mayOverride = configuration[leftComponent.name].canOverride || sameValue;
+ if (!everyValuesPair(mayOverride.bind(null, validator), leftComponent, rightComponent))
+ continue propertyLoop;
+ }
+
+ overrideShorthand(left, right);
+ left.dirty = true;
+ } else if (withMerging && left.shorthand && right.shorthand && isComponentOf(left, right)) {
+ // border is a shorthand but any of its components is a shorthand too
+
+ if (!left.important && right.important)
+ continue;
+
+ component = findComponentIn(left, right);
+ mayOverride = configuration[right.name].canOverride || sameValue;
+ if (!everyValuesPair(mayOverride.bind(null, validator), component, right))
+ continue;
+
+ if (left.important && !right.important) {
+ right.unused = true;
+ continue;
+ }
+
+ var rightRestored = configuration[right.name].restore(right, configuration);
+ if (rightRestored.length > 1)
+ continue;
+
+ component = findComponentIn(left, right);
+ override(component, right);
+ right.dirty = true;
+ } else if (left.name == right.name) {
+ // two non-shorthands should be merged based on understandability
+ overridable = true;
+
+ if (right.shorthand) {
+ for (k = right.components.length - 1; k >= 0 && overridable; k--) {
+ overriddenComponent = left.components[k];
+ overridingComponent = right.components[k];
+ mayOverride = configuration[overridingComponent.name].canOverride || sameValue;
+
+ overridable = overridable && everyValuesPair(mayOverride.bind(null, validator), overriddenComponent, overridingComponent);
+ }
+ } else {
+ mayOverride = configuration[right.name].canOverride || sameValue;
+ overridable = everyValuesPair(mayOverride.bind(null, validator), left, right);
+ }
+
+ if (left.important && !right.important && overridable) {
+ right.unused = true;
+ continue;
+ }
+
+ if (!left.important && right.important && overridable) {
+ left.unused = true;
+ continue;
+ }
+
+ if (!overridable) {
+ continue;
+ }
+
+ left.unused = true;
+ }
+ }
+ }
+}
+
+module.exports = overrideProperties;
+
+
+/***/ }),
+
+/***/ 7627:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var configuration = __webpack_require__(2341);
+
+function overridesNonComponentShorthand(property1, property2) {
+ return property1.name in configuration &&
+ 'overridesShorthands' in configuration[property1.name] &&
+ configuration[property1.name].overridesShorthands.indexOf(property2.name) > -1;
+}
+
+module.exports = overridesNonComponentShorthand;
+
+
+/***/ }),
+
+/***/ 5979:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var configuration = __webpack_require__(2341);
+var InvalidPropertyError = __webpack_require__(406);
+
+function populateComponents(properties, validator, warnings) {
+ var component;
+ var j, m;
+
+ for (var i = properties.length - 1; i >= 0; i--) {
+ var property = properties[i];
+ var descriptor = configuration[property.name];
+
+ if (!property.dynamic && descriptor && descriptor.shorthand) {
+ if (onlyValueIsVariable(property, validator) || moreThanOneValueIsVariable(property, validator)) {
+ property.optimizable = false;
+ continue;
+ }
+
+ property.shorthand = true;
+ property.dirty = true;
+
+ try {
+ property.components = descriptor.breakUp(property, configuration, validator);
+
+ if (descriptor.shorthandComponents) {
+ for (j = 0, m = property.components.length; j < m; j++) {
+ component = property.components[j];
+ component.components = configuration[component.name].breakUp(component, configuration, validator);
+ }
+ }
+ } catch (e) {
+ if (e instanceof InvalidPropertyError) {
+ property.components = []; // this will set property.unused to true below
+ warnings.push(e.message);
+ } else {
+ throw e;
+ }
+ }
+
+ if (property.components.length > 0)
+ property.multiplex = property.components[0].multiplex;
+ else
+ property.unused = true;
+ }
+ }
+}
+
+function onlyValueIsVariable(property, validator) {
+ return property.value.length == 1 && validator.isVariable(property.value[0][1]);
+}
+
+function moreThanOneValueIsVariable(property, validator) {
+ return property.value.length > 1 && property.value.filter(function (value) { return validator.isVariable(value[1]); }).length > 1;
+}
+
+module.exports = populateComponents;
+
+
+/***/ }),
+
+/***/ 1324:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var isMergeable = __webpack_require__(1828);
+
+var optimizeProperties = __webpack_require__(8349);
+
+var cloneArray = __webpack_require__(1475);
+
+var Token = __webpack_require__(7298);
+
+var serializeBody = __webpack_require__(5327).body;
+var serializeRules = __webpack_require__(5327).rules;
+
+function reduceNonAdjacent(tokens, context) {
+ var options = context.options;
+ var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
+ var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
+ var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
+ var candidates = {};
+ var repeated = [];
+
+ for (var i = tokens.length - 1; i >= 0; i--) {
+ var token = tokens[i];
+
+ if (token[0] != Token.RULE) {
+ continue;
+ } else if (token[2].length === 0) {
+ continue;
+ }
+
+ var selectorAsString = serializeRules(token[1]);
+ var isComplexAndNotSpecial = token[1].length > 1 &&
+ isMergeable(selectorAsString, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging);
+ var wrappedSelectors = wrappedSelectorsFrom(token[1]);
+ var selectors = isComplexAndNotSpecial ?
+ [selectorAsString].concat(wrappedSelectors) :
+ [selectorAsString];
+
+ for (var j = 0, m = selectors.length; j < m; j++) {
+ var selector = selectors[j];
+
+ if (!candidates[selector])
+ candidates[selector] = [];
+ else
+ repeated.push(selector);
+
+ candidates[selector].push({
+ where: i,
+ list: wrappedSelectors,
+ isPartial: isComplexAndNotSpecial && j > 0,
+ isComplex: isComplexAndNotSpecial && j === 0
+ });
+ }
+ }
+
+ reduceSimpleNonAdjacentCases(tokens, repeated, candidates, options, context);
+ reduceComplexNonAdjacentCases(tokens, candidates, options, context);
+}
+
+function wrappedSelectorsFrom(list) {
+ var wrapped = [];
+
+ for (var i = 0; i < list.length; i++) {
+ wrapped.push([list[i][1]]);
+ }
+
+ return wrapped;
+}
+
+function reduceSimpleNonAdjacentCases(tokens, repeated, candidates, options, context) {
+ function filterOut(idx, bodies) {
+ return data[idx].isPartial && bodies.length === 0;
+ }
+
+ function reduceBody(token, newBody, processedCount, tokenIdx) {
+ if (!data[processedCount - tokenIdx - 1].isPartial)
+ token[2] = newBody;
+ }
+
+ for (var i = 0, l = repeated.length; i < l; i++) {
+ var selector = repeated[i];
+ var data = candidates[selector];
+
+ reduceSelector(tokens, data, {
+ filterOut: filterOut,
+ callback: reduceBody
+ }, options, context);
+ }
+}
+
+function reduceComplexNonAdjacentCases(tokens, candidates, options, context) {
+ var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
+ var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
+ var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
+ var localContext = {};
+
+ function filterOut(idx) {
+ return localContext.data[idx].where < localContext.intoPosition;
+ }
+
+ function collectReducedBodies(token, newBody, processedCount, tokenIdx) {
+ if (tokenIdx === 0)
+ localContext.reducedBodies.push(newBody);
+ }
+
+ allSelectors:
+ for (var complexSelector in candidates) {
+ var into = candidates[complexSelector];
+ if (!into[0].isComplex)
+ continue;
+
+ var intoPosition = into[into.length - 1].where;
+ var intoToken = tokens[intoPosition];
+ var reducedBodies = [];
+
+ var selectors = isMergeable(complexSelector, mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging) ?
+ into[0].list :
+ [complexSelector];
+
+ localContext.intoPosition = intoPosition;
+ localContext.reducedBodies = reducedBodies;
+
+ for (var j = 0, m = selectors.length; j < m; j++) {
+ var selector = selectors[j];
+ var data = candidates[selector];
+
+ if (data.length < 2)
+ continue allSelectors;
+
+ localContext.data = data;
+
+ reduceSelector(tokens, data, {
+ filterOut: filterOut,
+ callback: collectReducedBodies
+ }, options, context);
+
+ if (serializeBody(reducedBodies[reducedBodies.length - 1]) != serializeBody(reducedBodies[0]))
+ continue allSelectors;
+ }
+
+ intoToken[2] = reducedBodies[0];
+ }
+}
+
+function reduceSelector(tokens, data, context, options, outerContext) {
+ var bodies = [];
+ var bodiesAsList = [];
+ var processedTokens = [];
+
+ for (var j = data.length - 1; j >= 0; j--) {
+ if (context.filterOut(j, bodies))
+ continue;
+
+ var where = data[j].where;
+ var token = tokens[where];
+ var clonedBody = cloneArray(token[2]);
+
+ bodies = bodies.concat(clonedBody);
+ bodiesAsList.push(clonedBody);
+ processedTokens.push(where);
+ }
+
+ optimizeProperties(bodies, true, false, outerContext);
+
+ var processedCount = processedTokens.length;
+ var propertyIdx = bodies.length - 1;
+ var tokenIdx = processedCount - 1;
+
+ while (tokenIdx >= 0) {
+ if ((tokenIdx === 0 || (bodies[propertyIdx] && bodiesAsList[tokenIdx].indexOf(bodies[propertyIdx]) > -1)) && propertyIdx > -1) {
+ propertyIdx--;
+ continue;
+ }
+
+ var newBody = bodies.splice(propertyIdx + 1);
+ context.callback(tokens[processedTokens[tokenIdx]], newBody, processedCount, tokenIdx);
+
+ tokenIdx--;
+ }
+}
+
+module.exports = reduceNonAdjacent;
+
+
+/***/ }),
+
+/***/ 6031:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Token = __webpack_require__(7298);
+
+var serializeAll = __webpack_require__(5327).all;
+
+var FONT_FACE_SCOPE = '@font-face';
+
+function removeDuplicateFontAtRules(tokens) {
+ var fontAtRules = [];
+ var token;
+ var key;
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ token = tokens[i];
+
+ if (token[0] != Token.AT_RULE_BLOCK && token[1][0][1] != FONT_FACE_SCOPE) {
+ continue;
+ }
+
+ key = serializeAll([token]);
+
+ if (fontAtRules.indexOf(key) > -1) {
+ token[2] = [];
+ } else {
+ fontAtRules.push(key);
+ }
+ }
+}
+
+module.exports = removeDuplicateFontAtRules;
+
+
+/***/ }),
+
+/***/ 3920:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Token = __webpack_require__(7298);
+
+var serializeAll = __webpack_require__(5327).all;
+var serializeRules = __webpack_require__(5327).rules;
+
+function removeDuplicateMediaQueries(tokens) {
+ var candidates = {};
+ var candidate;
+ var token;
+ var key;
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ token = tokens[i];
+ if (token[0] != Token.NESTED_BLOCK) {
+ continue;
+ }
+
+ key = serializeRules(token[1]) + '%' + serializeAll(token[2]);
+ candidate = candidates[key];
+
+ if (candidate) {
+ candidate[2] = [];
+ }
+
+ candidates[key] = token;
+ }
+}
+
+module.exports = removeDuplicateMediaQueries;
+
+
+/***/ }),
+
+/***/ 195:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Token = __webpack_require__(7298);
+
+var serializeBody = __webpack_require__(5327).body;
+var serializeRules = __webpack_require__(5327).rules;
+
+function removeDuplicates(tokens) {
+ var matched = {};
+ var moreThanOnce = [];
+ var id, token;
+ var body, bodies;
+
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ token = tokens[i];
+ if (token[0] != Token.RULE)
+ continue;
+
+ id = serializeRules(token[1]);
+
+ if (matched[id] && matched[id].length == 1)
+ moreThanOnce.push(id);
+ else
+ matched[id] = matched[id] || [];
+
+ matched[id].push(i);
+ }
+
+ for (i = 0, l = moreThanOnce.length; i < l; i++) {
+ id = moreThanOnce[i];
+ bodies = [];
+
+ for (var j = matched[id].length - 1; j >= 0; j--) {
+ token = tokens[matched[id][j]];
+ body = serializeBody(token[2]);
+
+ if (bodies.indexOf(body) > -1)
+ token[2] = [];
+ else
+ bodies.push(body);
+ }
+ }
+}
+
+module.exports = removeDuplicates;
+
+
+/***/ }),
+
+/***/ 2608:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var populateComponents = __webpack_require__(5979);
+
+var wrapForOptimizing = __webpack_require__(4082).single;
+var restoreFromOptimizing = __webpack_require__(4168);
+
+var Token = __webpack_require__(7298);
+
+var animationNameRegex = /^(\-moz\-|\-o\-|\-webkit\-)?animation-name$/;
+var animationRegex = /^(\-moz\-|\-o\-|\-webkit\-)?animation$/;
+var keyframeRegex = /^@(\-moz\-|\-o\-|\-webkit\-)?keyframes /;
+var importantRegex = /\s{0,31}!important$/;
+var optionalMatchingQuotesRegex = /^(['"]?)(.*)\1$/;
+
+function normalize(value) {
+ return value
+ .replace(optionalMatchingQuotesRegex, '$2')
+ .replace(importantRegex, '');
+}
+
+function removeUnusedAtRules(tokens, context) {
+ removeUnusedAtRule(tokens, matchCounterStyle, markCounterStylesAsUsed, context);
+ removeUnusedAtRule(tokens, matchFontFace, markFontFacesAsUsed, context);
+ removeUnusedAtRule(tokens, matchKeyframe, markKeyframesAsUsed, context);
+ removeUnusedAtRule(tokens, matchNamespace, markNamespacesAsUsed, context);
+}
+
+function removeUnusedAtRule(tokens, matchCallback, markCallback, context) {
+ var atRules = {};
+ var atRule;
+ var atRuleTokens;
+ var atRuleToken;
+ var zeroAt;
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ matchCallback(tokens[i], atRules);
+ }
+
+ if (Object.keys(atRules).length === 0) {
+ return;
+ }
+
+ markUsedAtRules(tokens, markCallback, atRules, context);
+
+ for (atRule in atRules) {
+ atRuleTokens = atRules[atRule];
+
+ for (i = 0, l = atRuleTokens.length; i < l; i++) {
+ atRuleToken = atRuleTokens[i];
+ zeroAt = atRuleToken[0] == Token.AT_RULE ? 1 : 2;
+ atRuleToken[zeroAt] = [];
+ }
+ }
+}
+
+function markUsedAtRules(tokens, markCallback, atRules, context) {
+ var boundMarkCallback = markCallback(atRules);
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ switch (tokens[i][0]) {
+ case Token.RULE:
+ boundMarkCallback(tokens[i], context);
+ break;
+ case Token.NESTED_BLOCK:
+ markUsedAtRules(tokens[i][2], markCallback, atRules, context);
+ }
+ }
+}
+
+function matchCounterStyle(token, atRules) {
+ var match;
+
+ if (token[0] == Token.AT_RULE_BLOCK && token[1][0][1].indexOf('@counter-style') === 0) {
+ match = token[1][0][1].split(' ')[1];
+ atRules[match] = atRules[match] || [];
+ atRules[match].push(token);
+ }
+}
+
+function markCounterStylesAsUsed(atRules) {
+ return function (token, context) {
+ var property;
+ var wrappedProperty;
+ var i, l;
+
+ for (i = 0, l = token[2].length; i < l; i++) {
+ property = token[2][i];
+
+ if (property[1][1] == 'list-style') {
+ wrappedProperty = wrapForOptimizing(property);
+ populateComponents([wrappedProperty], context.validator, context.warnings);
+
+ if (wrappedProperty.components[0].value[0][1] in atRules) {
+ delete atRules[property[2][1]];
+ }
+
+ restoreFromOptimizing([wrappedProperty]);
+ }
+
+ if (property[1][1] == 'list-style-type' && property[2][1] in atRules) {
+ delete atRules[property[2][1]];
+ }
+ }
+ };
+}
+
+function matchFontFace(token, atRules) {
+ var property;
+ var match;
+ var i, l;
+
+ if (token[0] == Token.AT_RULE_BLOCK && token[1][0][1] == '@font-face') {
+ for (i = 0, l = token[2].length; i < l; i++) {
+ property = token[2][i];
+
+ if (property[1][1] == 'font-family') {
+ match = normalize(property[2][1].toLowerCase());
+ atRules[match] = atRules[match] || [];
+ atRules[match].push(token);
+ break;
+ }
+ }
+ }
+}
+
+function markFontFacesAsUsed(atRules) {
+ return function (token, context) {
+ var property;
+ var wrappedProperty;
+ var component;
+ var normalizedMatch;
+ var i, l;
+ var j, m;
+
+ for (i = 0, l = token[2].length; i < l; i++) {
+ property = token[2][i];
+
+ if (property[1][1] == 'font') {
+ wrappedProperty = wrapForOptimizing(property);
+ populateComponents([wrappedProperty], context.validator, context.warnings);
+ component = wrappedProperty.components[6];
+
+ for (j = 0, m = component.value.length; j < m; j++) {
+ normalizedMatch = normalize(component.value[j][1].toLowerCase());
+
+ if (normalizedMatch in atRules) {
+ delete atRules[normalizedMatch];
+ }
+ }
+
+ restoreFromOptimizing([wrappedProperty]);
+ }
+
+ if (property[1][1] == 'font-family') {
+ for (j = 2, m = property.length; j < m; j++) {
+ normalizedMatch = normalize(property[j][1].toLowerCase());
+
+ if (normalizedMatch in atRules) {
+ delete atRules[normalizedMatch];
+ }
+ }
+ }
+ }
+ };
+}
+
+function matchKeyframe(token, atRules) {
+ var match;
+
+ if (token[0] == Token.NESTED_BLOCK && keyframeRegex.test(token[1][0][1])) {
+ match = token[1][0][1].split(' ')[1];
+ atRules[match] = atRules[match] || [];
+ atRules[match].push(token);
+ }
+}
+
+function markKeyframesAsUsed(atRules) {
+ return function (token, context) {
+ var property;
+ var wrappedProperty;
+ var component;
+ var i, l;
+ var j, m;
+
+ for (i = 0, l = token[2].length; i < l; i++) {
+ property = token[2][i];
+
+ if (animationRegex.test(property[1][1])) {
+ wrappedProperty = wrapForOptimizing(property);
+ populateComponents([wrappedProperty], context.validator, context.warnings);
+ component = wrappedProperty.components[7];
+
+ for (j = 0, m = component.value.length; j < m; j++) {
+ if (component.value[j][1] in atRules) {
+ delete atRules[component.value[j][1]];
+ }
+ }
+
+ restoreFromOptimizing([wrappedProperty]);
+ }
+
+ if (animationNameRegex.test(property[1][1])) {
+ for (j = 2, m = property.length; j < m; j++) {
+ if (property[j][1] in atRules) {
+ delete atRules[property[j][1]];
+ }
+ }
+ }
+ }
+ };
+}
+
+function matchNamespace(token, atRules) {
+ var match;
+
+ if (token[0] == Token.AT_RULE && token[1].indexOf('@namespace') === 0) {
+ match = token[1].split(' ')[1];
+ atRules[match] = atRules[match] || [];
+ atRules[match].push(token);
+ }
+}
+
+function markNamespacesAsUsed(atRules) {
+ var namespaceRegex = new RegExp(Object.keys(atRules).join('\\\||') + '\\\|', 'g');
+
+ return function (token) {
+ var match;
+ var scope;
+ var normalizedMatch;
+ var i, l;
+ var j, m;
+
+ for (i = 0, l = token[1].length; i < l; i++) {
+ scope = token[1][i];
+ match = scope[1].match(namespaceRegex);
+
+ for (j = 0, m = match.length; j < m; j++) {
+ normalizedMatch = match[j].substring(0, match[j].length - 1);
+
+ if (normalizedMatch in atRules) {
+ delete atRules[normalizedMatch];
+ }
+ }
+ }
+ };
+}
+
+module.exports = removeUnusedAtRules;
+
+
+/***/ }),
+
+/***/ 9244:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+// TODO: it'd be great to merge it with the other canReorder functionality
+
+var rulesOverlap = __webpack_require__(9066);
+var specificitiesOverlap = __webpack_require__(7470);
+
+var FLEX_PROPERTIES = /align\-items|box\-align|box\-pack|flex|justify/;
+var BORDER_PROPERTIES = /^border\-(top|right|bottom|left|color|style|width|radius)/;
+
+function canReorder(left, right, cache) {
+ for (var i = right.length - 1; i >= 0; i--) {
+ for (var j = left.length - 1; j >= 0; j--) {
+ if (!canReorderSingle(left[j], right[i], cache))
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function canReorderSingle(left, right, cache) {
+ var leftName = left[0];
+ var leftValue = left[1];
+ var leftNameRoot = left[2];
+ var leftSelector = left[5];
+ var leftInSpecificSelector = left[6];
+ var rightName = right[0];
+ var rightValue = right[1];
+ var rightNameRoot = right[2];
+ var rightSelector = right[5];
+ var rightInSpecificSelector = right[6];
+
+ if (leftName == 'font' && rightName == 'line-height' || rightName == 'font' && leftName == 'line-height')
+ return false;
+ if (FLEX_PROPERTIES.test(leftName) && FLEX_PROPERTIES.test(rightName))
+ return false;
+ if (leftNameRoot == rightNameRoot && unprefixed(leftName) == unprefixed(rightName) && (vendorPrefixed(leftName) ^ vendorPrefixed(rightName)))
+ return false;
+ if (leftNameRoot == 'border' && BORDER_PROPERTIES.test(rightNameRoot) && (leftName == 'border' || leftName == rightNameRoot || (leftValue != rightValue && sameBorderComponent(leftName, rightName))))
+ return false;
+ if (rightNameRoot == 'border' && BORDER_PROPERTIES.test(leftNameRoot) && (rightName == 'border' || rightName == leftNameRoot || (leftValue != rightValue && sameBorderComponent(leftName, rightName))))
+ return false;
+ if (leftNameRoot == 'border' && rightNameRoot == 'border' && leftName != rightName && (isSideBorder(leftName) && isStyleBorder(rightName) || isStyleBorder(leftName) && isSideBorder(rightName)))
+ return false;
+ if (leftNameRoot != rightNameRoot)
+ return true;
+ if (leftName == rightName && leftNameRoot == rightNameRoot && (leftValue == rightValue || withDifferentVendorPrefix(leftValue, rightValue)))
+ return true;
+ if (leftName != rightName && leftNameRoot == rightNameRoot && leftName != leftNameRoot && rightName != rightNameRoot)
+ return true;
+ if (leftName != rightName && leftNameRoot == rightNameRoot && leftValue == rightValue)
+ return true;
+ if (rightInSpecificSelector && leftInSpecificSelector && !inheritable(leftNameRoot) && !inheritable(rightNameRoot) && !rulesOverlap(rightSelector, leftSelector, false))
+ return true;
+ if (!specificitiesOverlap(leftSelector, rightSelector, cache))
+ return true;
+
+ return false;
+}
+
+function vendorPrefixed(name) {
+ return /^\-(?:moz|webkit|ms|o)\-/.test(name);
+}
+
+function unprefixed(name) {
+ return name.replace(/^\-(?:moz|webkit|ms|o)\-/, '');
+}
+
+function sameBorderComponent(name1, name2) {
+ return name1.split('-').pop() == name2.split('-').pop();
+}
+
+function isSideBorder(name) {
+ return name == 'border-top' || name == 'border-right' || name == 'border-bottom' || name == 'border-left';
+}
+
+function isStyleBorder(name) {
+ return name == 'border-color' || name == 'border-style' || name == 'border-width';
+}
+
+function withDifferentVendorPrefix(value1, value2) {
+ return vendorPrefixed(value1) && vendorPrefixed(value2) && value1.split('-')[1] != value2.split('-')[2];
+}
+
+function inheritable(name) {
+ // According to http://www.w3.org/TR/CSS21/propidx.html
+ // Others will be catched by other, preceeding rules
+ return name == 'font' || name == 'line-height' || name == 'list-style';
+}
+
+module.exports = {
+ canReorder: canReorder,
+ canReorderSingle: canReorderSingle
+};
+
+
+/***/ }),
+
+/***/ 6327:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var configuration = __webpack_require__(2341);
+
+function restoreWithComponents(property) {
+ var descriptor = configuration[property.name];
+
+ if (descriptor && descriptor.shorthand) {
+ return descriptor.restore(property, configuration);
+ } else {
+ return property.value;
+ }
+}
+
+module.exports = restoreWithComponents;
+
+
+/***/ }),
+
+/***/ 4607:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var canReorderSingle = __webpack_require__(9244).canReorderSingle;
+var extractProperties = __webpack_require__(9123);
+var isMergeable = __webpack_require__(1828);
+var tidyRuleDuplicates = __webpack_require__(512);
+
+var Token = __webpack_require__(7298);
+
+var cloneArray = __webpack_require__(1475);
+
+var serializeBody = __webpack_require__(5327).body;
+var serializeRules = __webpack_require__(5327).rules;
+
+function naturalSorter(a, b) {
+ return a > b ? 1 : -1;
+}
+
+function cloneAndMergeSelectors(propertyA, propertyB) {
+ var cloned = cloneArray(propertyA);
+ cloned[5] = cloned[5].concat(propertyB[5]);
+
+ return cloned;
+}
+
+function restructure(tokens, context) {
+ var options = context.options;
+ var mergeablePseudoClasses = options.compatibility.selectors.mergeablePseudoClasses;
+ var mergeablePseudoElements = options.compatibility.selectors.mergeablePseudoElements;
+ var mergeLimit = options.compatibility.selectors.mergeLimit;
+ var multiplePseudoMerging = options.compatibility.selectors.multiplePseudoMerging;
+ var specificityCache = context.cache.specificity;
+ var movableTokens = {};
+ var movedProperties = [];
+ var multiPropertyMoveCache = {};
+ var movedToBeDropped = [];
+ var maxCombinationsLevel = 2;
+ var ID_JOIN_CHARACTER = '%';
+
+ function sendToMultiPropertyMoveCache(position, movedProperty, allFits) {
+ for (var i = allFits.length - 1; i >= 0; i--) {
+ var fit = allFits[i][0];
+ var id = addToCache(movedProperty, fit);
+
+ if (multiPropertyMoveCache[id].length > 1 && processMultiPropertyMove(position, multiPropertyMoveCache[id])) {
+ removeAllMatchingFromCache(id);
+ break;
+ }
+ }
+ }
+
+ function addToCache(movedProperty, fit) {
+ var id = cacheId(fit);
+ multiPropertyMoveCache[id] = multiPropertyMoveCache[id] || [];
+ multiPropertyMoveCache[id].push([movedProperty, fit]);
+ return id;
+ }
+
+ function removeAllMatchingFromCache(matchId) {
+ var matchSelectors = matchId.split(ID_JOIN_CHARACTER);
+ var forRemoval = [];
+ var i;
+
+ for (var id in multiPropertyMoveCache) {
+ var selectors = id.split(ID_JOIN_CHARACTER);
+ for (i = selectors.length - 1; i >= 0; i--) {
+ if (matchSelectors.indexOf(selectors[i]) > -1) {
+ forRemoval.push(id);
+ break;
+ }
+ }
+ }
+
+ for (i = forRemoval.length - 1; i >= 0; i--) {
+ delete multiPropertyMoveCache[forRemoval[i]];
+ }
+ }
+
+ function cacheId(cachedTokens) {
+ var id = [];
+ for (var i = 0, l = cachedTokens.length; i < l; i++) {
+ id.push(serializeRules(cachedTokens[i][1]));
+ }
+ return id.join(ID_JOIN_CHARACTER);
+ }
+
+ function tokensToMerge(sourceTokens) {
+ var uniqueTokensWithBody = [];
+ var mergeableTokens = [];
+
+ for (var i = sourceTokens.length - 1; i >= 0; i--) {
+ if (!isMergeable(serializeRules(sourceTokens[i][1]), mergeablePseudoClasses, mergeablePseudoElements, multiplePseudoMerging)) {
+ continue;
+ }
+
+ mergeableTokens.unshift(sourceTokens[i]);
+ if (sourceTokens[i][2].length > 0 && uniqueTokensWithBody.indexOf(sourceTokens[i]) == -1)
+ uniqueTokensWithBody.push(sourceTokens[i]);
+ }
+
+ return uniqueTokensWithBody.length > 1 ?
+ mergeableTokens :
+ [];
+ }
+
+ function shortenIfPossible(position, movedProperty) {
+ var name = movedProperty[0];
+ var value = movedProperty[1];
+ var key = movedProperty[4];
+ var valueSize = name.length + value.length + 1;
+ var allSelectors = [];
+ var qualifiedTokens = [];
+
+ var mergeableTokens = tokensToMerge(movableTokens[key]);
+ if (mergeableTokens.length < 2)
+ return;
+
+ var allFits = findAllFits(mergeableTokens, valueSize, 1);
+ var bestFit = allFits[0];
+ if (bestFit[1] > 0)
+ return sendToMultiPropertyMoveCache(position, movedProperty, allFits);
+
+ for (var i = bestFit[0].length - 1; i >=0; i--) {
+ allSelectors = bestFit[0][i][1].concat(allSelectors);
+ qualifiedTokens.unshift(bestFit[0][i]);
+ }
+
+ allSelectors = tidyRuleDuplicates(allSelectors);
+ dropAsNewTokenAt(position, [movedProperty], allSelectors, qualifiedTokens);
+ }
+
+ function fitSorter(fit1, fit2) {
+ return fit1[1] > fit2[1] ? 1 : (fit1[1] == fit2[1] ? 0 : -1);
+ }
+
+ function findAllFits(mergeableTokens, propertySize, propertiesCount) {
+ var combinations = allCombinations(mergeableTokens, propertySize, propertiesCount, maxCombinationsLevel - 1);
+ return combinations.sort(fitSorter);
+ }
+
+ function allCombinations(tokensVariant, propertySize, propertiesCount, level) {
+ var differenceVariants = [[tokensVariant, sizeDifference(tokensVariant, propertySize, propertiesCount)]];
+ if (tokensVariant.length > 2 && level > 0) {
+ for (var i = tokensVariant.length - 1; i >= 0; i--) {
+ var subVariant = Array.prototype.slice.call(tokensVariant, 0);
+ subVariant.splice(i, 1);
+ differenceVariants = differenceVariants.concat(allCombinations(subVariant, propertySize, propertiesCount, level - 1));
+ }
+ }
+
+ return differenceVariants;
+ }
+
+ function sizeDifference(tokensVariant, propertySize, propertiesCount) {
+ var allSelectorsSize = 0;
+ for (var i = tokensVariant.length - 1; i >= 0; i--) {
+ allSelectorsSize += tokensVariant[i][2].length > propertiesCount ? serializeRules(tokensVariant[i][1]).length : -1;
+ }
+ return allSelectorsSize - (tokensVariant.length - 1) * propertySize + 1;
+ }
+
+ function dropAsNewTokenAt(position, properties, allSelectors, mergeableTokens) {
+ var i, j, k, m;
+ var allProperties = [];
+
+ for (i = mergeableTokens.length - 1; i >= 0; i--) {
+ var mergeableToken = mergeableTokens[i];
+
+ for (j = mergeableToken[2].length - 1; j >= 0; j--) {
+ var mergeableProperty = mergeableToken[2][j];
+
+ for (k = 0, m = properties.length; k < m; k++) {
+ var property = properties[k];
+
+ var mergeablePropertyName = mergeableProperty[1][1];
+ var propertyName = property[0];
+ var propertyBody = property[4];
+ if (mergeablePropertyName == propertyName && serializeBody([mergeableProperty]) == propertyBody) {
+ mergeableToken[2].splice(j, 1);
+ break;
+ }
+ }
+ }
+ }
+
+ for (i = properties.length - 1; i >= 0; i--) {
+ allProperties.unshift(properties[i][3]);
+ }
+
+ var newToken = [Token.RULE, allSelectors, allProperties];
+ tokens.splice(position, 0, newToken);
+ }
+
+ function dropPropertiesAt(position, movedProperty) {
+ var key = movedProperty[4];
+ var toMove = movableTokens[key];
+
+ if (toMove && toMove.length > 1) {
+ if (!shortenMultiMovesIfPossible(position, movedProperty))
+ shortenIfPossible(position, movedProperty);
+ }
+ }
+
+ function shortenMultiMovesIfPossible(position, movedProperty) {
+ var candidates = [];
+ var propertiesAndMergableTokens = [];
+ var key = movedProperty[4];
+ var j, k;
+
+ var mergeableTokens = tokensToMerge(movableTokens[key]);
+ if (mergeableTokens.length < 2)
+ return;
+
+ movableLoop:
+ for (var value in movableTokens) {
+ var tokensList = movableTokens[value];
+
+ for (j = mergeableTokens.length - 1; j >= 0; j--) {
+ if (tokensList.indexOf(mergeableTokens[j]) == -1)
+ continue movableLoop;
+ }
+
+ candidates.push(value);
+ }
+
+ if (candidates.length < 2)
+ return false;
+
+ for (j = candidates.length - 1; j >= 0; j--) {
+ for (k = movedProperties.length - 1; k >= 0; k--) {
+ if (movedProperties[k][4] == candidates[j]) {
+ propertiesAndMergableTokens.unshift([movedProperties[k], mergeableTokens]);
+ break;
+ }
+ }
+ }
+
+ return processMultiPropertyMove(position, propertiesAndMergableTokens);
+ }
+
+ function processMultiPropertyMove(position, propertiesAndMergableTokens) {
+ var valueSize = 0;
+ var properties = [];
+ var property;
+
+ for (var i = propertiesAndMergableTokens.length - 1; i >= 0; i--) {
+ property = propertiesAndMergableTokens[i][0];
+ var fullValue = property[4];
+ valueSize += fullValue.length + (i > 0 ? 1 : 0);
+
+ properties.push(property);
+ }
+
+ var mergeableTokens = propertiesAndMergableTokens[0][1];
+ var bestFit = findAllFits(mergeableTokens, valueSize, properties.length)[0];
+ if (bestFit[1] > 0)
+ return false;
+
+ var allSelectors = [];
+ var qualifiedTokens = [];
+ for (i = bestFit[0].length - 1; i >= 0; i--) {
+ allSelectors = bestFit[0][i][1].concat(allSelectors);
+ qualifiedTokens.unshift(bestFit[0][i]);
+ }
+
+ allSelectors = tidyRuleDuplicates(allSelectors);
+ dropAsNewTokenAt(position, properties, allSelectors, qualifiedTokens);
+
+ for (i = properties.length - 1; i >= 0; i--) {
+ property = properties[i];
+ var index = movedProperties.indexOf(property);
+
+ delete movableTokens[property[4]];
+
+ if (index > -1 && movedToBeDropped.indexOf(index) == -1)
+ movedToBeDropped.push(index);
+ }
+
+ return true;
+ }
+
+ function boundToAnotherPropertyInCurrrentToken(property, movedProperty, token) {
+ var propertyName = property[0];
+ var movedPropertyName = movedProperty[0];
+ if (propertyName != movedPropertyName)
+ return false;
+
+ var key = movedProperty[4];
+ var toMove = movableTokens[key];
+ return toMove && toMove.indexOf(token) > -1;
+ }
+
+ for (var i = tokens.length - 1; i >= 0; i--) {
+ var token = tokens[i];
+ var isRule;
+ var j, k, m;
+ var samePropertyAt;
+
+ if (token[0] == Token.RULE) {
+ isRule = true;
+ } else if (token[0] == Token.NESTED_BLOCK) {
+ isRule = false;
+ } else {
+ continue;
+ }
+
+ // We cache movedProperties.length as it may change in the loop
+ var movedCount = movedProperties.length;
+
+ var properties = extractProperties(token);
+ movedToBeDropped = [];
+
+ var unmovableInCurrentToken = [];
+ for (j = properties.length - 1; j >= 0; j--) {
+ for (k = j - 1; k >= 0; k--) {
+ if (!canReorderSingle(properties[j], properties[k], specificityCache)) {
+ unmovableInCurrentToken.push(j);
+ break;
+ }
+ }
+ }
+
+ for (j = properties.length - 1; j >= 0; j--) {
+ var property = properties[j];
+ var movedSameProperty = false;
+
+ for (k = 0; k < movedCount; k++) {
+ var movedProperty = movedProperties[k];
+
+ if (movedToBeDropped.indexOf(k) == -1 && (!canReorderSingle(property, movedProperty, specificityCache) && !boundToAnotherPropertyInCurrrentToken(property, movedProperty, token) ||
+ movableTokens[movedProperty[4]] && movableTokens[movedProperty[4]].length === mergeLimit)) {
+ dropPropertiesAt(i + 1, movedProperty, token);
+
+ if (movedToBeDropped.indexOf(k) == -1) {
+ movedToBeDropped.push(k);
+ delete movableTokens[movedProperty[4]];
+ }
+ }
+
+ if (!movedSameProperty) {
+ movedSameProperty = property[0] == movedProperty[0] && property[1] == movedProperty[1];
+
+ if (movedSameProperty) {
+ samePropertyAt = k;
+ }
+ }
+ }
+
+ if (!isRule || unmovableInCurrentToken.indexOf(j) > -1)
+ continue;
+
+ var key = property[4];
+
+ if (movedSameProperty && movedProperties[samePropertyAt][5].length + property[5].length > mergeLimit) {
+ dropPropertiesAt(i + 1, movedProperties[samePropertyAt]);
+ movedProperties.splice(samePropertyAt, 1);
+ movableTokens[key] = [token];
+ movedSameProperty = false;
+ } else {
+ movableTokens[key] = movableTokens[key] || [];
+ movableTokens[key].push(token);
+ }
+
+ if (movedSameProperty) {
+ movedProperties[samePropertyAt] = cloneAndMergeSelectors(movedProperties[samePropertyAt], property);
+ } else {
+ movedProperties.push(property);
+ }
+ }
+
+ movedToBeDropped = movedToBeDropped.sort(naturalSorter);
+ for (j = 0, m = movedToBeDropped.length; j < m; j++) {
+ var dropAt = movedToBeDropped[j] - j;
+ movedProperties.splice(dropAt, 1);
+ }
+ }
+
+ var position = tokens[0] && tokens[0][0] == Token.AT_RULE && tokens[0][1].indexOf('@charset') === 0 ? 1 : 0;
+ for (; position < tokens.length - 1; position++) {
+ var isImportRule = tokens[position][0] === Token.AT_RULE && tokens[position][1].indexOf('@import') === 0;
+ var isComment = tokens[position][0] === Token.COMMENT;
+ if (!(isImportRule || isComment))
+ break;
+ }
+
+ for (i = 0; i < movedProperties.length; i++) {
+ dropPropertiesAt(position, movedProperties[i]);
+ }
+}
+
+module.exports = restructure;
+
+
+/***/ }),
+
+/***/ 9066:
+/***/ ((module) => {
+
+var MODIFIER_PATTERN = /\-\-.+$/;
+
+function rulesOverlap(rule1, rule2, bemMode) {
+ var scope1;
+ var scope2;
+ var i, l;
+ var j, m;
+
+ for (i = 0, l = rule1.length; i < l; i++) {
+ scope1 = rule1[i][1];
+
+ for (j = 0, m = rule2.length; j < m; j++) {
+ scope2 = rule2[j][1];
+
+ if (scope1 == scope2) {
+ return true;
+ }
+
+ if (bemMode && withoutModifiers(scope1) == withoutModifiers(scope2)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+function withoutModifiers(scope) {
+ return scope.replace(MODIFIER_PATTERN, '');
+}
+
+module.exports = rulesOverlap;
+
+
+/***/ }),
+
+/***/ 7470:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var specificity = __webpack_require__(1819);
+
+function specificitiesOverlap(selector1, selector2, cache) {
+ var specificity1;
+ var specificity2;
+ var i, l;
+ var j, m;
+
+ for (i = 0, l = selector1.length; i < l; i++) {
+ specificity1 = findSpecificity(selector1[i][1], cache);
+
+ for (j = 0, m = selector2.length; j < m; j++) {
+ specificity2 = findSpecificity(selector2[j][1], cache);
+
+ if (specificity1[0] === specificity2[0] && specificity1[1] === specificity2[1] && specificity1[2] === specificity2[2]) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+function findSpecificity(selector, cache) {
+ var value;
+
+ if (!(selector in cache)) {
+ cache[selector] = value = specificity(selector);
+ }
+
+ return value || cache[selector];
+}
+
+module.exports = specificitiesOverlap;
+
+
+/***/ }),
+
+/***/ 1819:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Marker = __webpack_require__(2638);
+
+var Selector = {
+ ADJACENT_SIBLING: '+',
+ DESCENDANT: '>',
+ DOT: '.',
+ HASH: '#',
+ NON_ADJACENT_SIBLING: '~',
+ PSEUDO: ':'
+};
+
+var LETTER_PATTERN = /[a-zA-Z]/;
+var NOT_PREFIX = ':not(';
+var SEPARATOR_PATTERN = /[\s,\(>~\+]/;
+
+function specificity(selector) {
+ var result = [0, 0, 0];
+ var character;
+ var isEscaped;
+ var isSingleQuoted;
+ var isDoubleQuoted;
+ var roundBracketLevel = 0;
+ var couldIntroduceNewTypeSelector;
+ var withinNotPseudoClass = false;
+ var wasPseudoClass = false;
+ var i, l;
+
+ for (i = 0, l = selector.length; i < l; i++) {
+ character = selector[i];
+
+ if (isEscaped) {
+ // noop
+ } else if (character == Marker.SINGLE_QUOTE && !isDoubleQuoted && !isSingleQuoted) {
+ isSingleQuoted = true;
+ } else if (character == Marker.SINGLE_QUOTE && !isDoubleQuoted && isSingleQuoted) {
+ isSingleQuoted = false;
+ } else if (character == Marker.DOUBLE_QUOTE && !isDoubleQuoted && !isSingleQuoted) {
+ isDoubleQuoted = true;
+ } else if (character == Marker.DOUBLE_QUOTE && isDoubleQuoted && !isSingleQuoted) {
+ isDoubleQuoted = false;
+ } else if (isSingleQuoted || isDoubleQuoted) {
+ continue;
+ } else if (roundBracketLevel > 0 && !withinNotPseudoClass) {
+ // noop
+ } else if (character == Marker.OPEN_ROUND_BRACKET) {
+ roundBracketLevel++;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET && roundBracketLevel == 1) {
+ roundBracketLevel--;
+ withinNotPseudoClass = false;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET) {
+ roundBracketLevel--;
+ } else if (character == Selector.HASH) {
+ result[0]++;
+ } else if (character == Selector.DOT || character == Marker.OPEN_SQUARE_BRACKET) {
+ result[1]++;
+ } else if (character == Selector.PSEUDO && !wasPseudoClass && !isNotPseudoClass(selector, i)) {
+ result[1]++;
+ withinNotPseudoClass = false;
+ } else if (character == Selector.PSEUDO) {
+ withinNotPseudoClass = true;
+ } else if ((i === 0 || couldIntroduceNewTypeSelector) && LETTER_PATTERN.test(character)) {
+ result[2]++;
+ }
+
+ isEscaped = character == Marker.BACK_SLASH;
+ wasPseudoClass = character == Selector.PSEUDO;
+ couldIntroduceNewTypeSelector = !isEscaped && SEPARATOR_PATTERN.test(character);
+ }
+
+ return result;
+}
+
+function isNotPseudoClass(selector, index) {
+ return selector.indexOf(NOT_PREFIX, index) === index;
+}
+
+module.exports = specificity;
+
+
+/***/ }),
+
+/***/ 512:
+/***/ ((module) => {
+
+function ruleSorter(s1, s2) {
+ return s1[1] > s2[1] ? 1 : -1;
+}
+
+function tidyRuleDuplicates(rules) {
+ var list = [];
+ var repeated = [];
+
+ for (var i = 0, l = rules.length; i < l; i++) {
+ var rule = rules[i];
+
+ if (repeated.indexOf(rule[1]) == -1) {
+ repeated.push(rule[1]);
+ list.push(rule);
+ }
+ }
+
+ return list.sort(ruleSorter);
+}
+
+module.exports = tidyRuleDuplicates;
+
+
+/***/ }),
+
+/***/ 142:
+/***/ ((module) => {
+
+function removeUnused(properties) {
+ for (var i = properties.length - 1; i >= 0; i--) {
+ var property = properties[i];
+
+ if (property.unused) {
+ property.all.splice(property.position, 1);
+ }
+ }
+}
+
+module.exports = removeUnused;
+
+
+/***/ }),
+
+/***/ 4168:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Hack = __webpack_require__(1084);
+
+var Marker = __webpack_require__(2638);
+
+var ASTERISK_HACK = '*';
+var BACKSLASH_HACK = '\\';
+var IMPORTANT_TOKEN = '!important';
+var UNDERSCORE_HACK = '_';
+var BANG_HACK = '!ie';
+
+function restoreFromOptimizing(properties, restoreCallback) {
+ var property;
+ var restored;
+ var current;
+ var i;
+
+ for (i = properties.length - 1; i >= 0; i--) {
+ property = properties[i];
+
+ if (property.dynamic && property.important) {
+ restoreImportant(property);
+ continue;
+ }
+
+ if (property.dynamic) {
+ continue;
+ }
+
+ if (property.unused) {
+ continue;
+ }
+
+ if (!property.dirty && !property.important && !property.hack) {
+ continue;
+ }
+
+ if (property.optimizable && restoreCallback) {
+ restored = restoreCallback(property);
+ property.value = restored;
+ } else {
+ restored = property.value;
+ }
+
+ if (property.important) {
+ restoreImportant(property);
+ }
+
+ if (property.hack) {
+ restoreHack(property);
+ }
+
+ if ('all' in property) {
+ current = property.all[property.position];
+ current[1][1] = property.name;
+
+ current.splice(2, current.length - 1);
+ Array.prototype.push.apply(current, restored);
+ }
+ }
+}
+
+function restoreImportant(property) {
+ property.value[property.value.length - 1][1] += IMPORTANT_TOKEN;
+}
+
+function restoreHack(property) {
+ if (property.hack[0] == Hack.UNDERSCORE) {
+ property.name = UNDERSCORE_HACK + property.name;
+ } else if (property.hack[0] == Hack.ASTERISK) {
+ property.name = ASTERISK_HACK + property.name;
+ } else if (property.hack[0] == Hack.BACKSLASH) {
+ property.value[property.value.length - 1][1] += BACKSLASH_HACK + property.hack[1];
+ } else if (property.hack[0] == Hack.BANG) {
+ property.value[property.value.length - 1][1] += Marker.SPACE + BANG_HACK;
+ }
+}
+
+module.exports = restoreFromOptimizing;
+
+
+/***/ }),
+
+/***/ 5047:
+/***/ ((module) => {
+
+var functionNoVendorRegexStr = '[A-Z]+(\\-|[A-Z]|[0-9])+\\(.*?\\)';
+var functionVendorRegexStr = '\\-(\\-|[A-Z]|[0-9])+\\(.*?\\)';
+var variableRegexStr = 'var\\(\\-\\-[^\\)]+\\)';
+var functionAnyRegexStr = '(' + variableRegexStr + '|' + functionNoVendorRegexStr + '|' + functionVendorRegexStr + ')';
+
+var calcRegex = new RegExp('^(\\-moz\\-|\\-webkit\\-)?calc\\([^\\)]+\\)$', 'i');
+var decimalRegex = /[0-9]/;
+var functionAnyRegex = new RegExp('^' + functionAnyRegexStr + '$', 'i');
+var hexAlphaColorRegex = /^#(?:[0-9a-f]{4}|[0-9a-f]{8})$/i;
+var hslColorRegex = /^hsl\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\d*\.?\d+%\s{0,31},\s{0,31}\.?\d+\s{0,31}\)$/;
+var identifierRegex = /^(\-[a-z0-9_][a-z0-9\-_]*|[a-z_][a-z0-9\-_]*)$/i;
+var namedEntityRegex = /^[a-z]+$/i;
+var prefixRegex = /^-([a-z0-9]|-)*$/i;
+var quotedTextRegex = /^("[^"]*"|'[^']*')$/i;
+var rgbColorRegex = /^rgb\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31}\)|rgba\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\.\d]+\s{0,31}\)$/i;
+var timeUnitPattern = /\d+(s|ms)/;
+var timingFunctionRegex = /^(cubic\-bezier|steps)\([^\)]+\)$/;
+var validTimeUnits = ['ms', 's'];
+var urlRegex = /^url\([\s\S]+\)$/i;
+var variableRegex = new RegExp('^' + variableRegexStr + '$', 'i');
+
+var eightValueColorRegex = /^#[0-9a-f]{8}$/i;
+var fourValueColorRegex = /^#[0-9a-f]{4}$/i;
+var sixValueColorRegex = /^#[0-9a-f]{6}$/i;
+var threeValueColorRegex = /^#[0-9a-f]{3}$/i;
+
+var DECIMAL_DOT = '.';
+var MINUS_SIGN = '-';
+var PLUS_SIGN = '+';
+
+var Keywords = {
+ '^': [
+ 'inherit',
+ 'initial',
+ 'unset'
+ ],
+ '*-style': [
+ 'auto',
+ 'dashed',
+ 'dotted',
+ 'double',
+ 'groove',
+ 'hidden',
+ 'inset',
+ 'none',
+ 'outset',
+ 'ridge',
+ 'solid'
+ ],
+ '*-timing-function': [
+ 'ease',
+ 'ease-in',
+ 'ease-in-out',
+ 'ease-out',
+ 'linear',
+ 'step-end',
+ 'step-start'
+ ],
+ 'animation-direction': [
+ 'alternate',
+ 'alternate-reverse',
+ 'normal',
+ 'reverse'
+ ],
+ 'animation-fill-mode': [
+ 'backwards',
+ 'both',
+ 'forwards',
+ 'none'
+ ],
+ 'animation-iteration-count': [
+ 'infinite'
+ ],
+ 'animation-name': [
+ 'none'
+ ],
+ 'animation-play-state': [
+ 'paused',
+ 'running'
+ ],
+ 'background-attachment': [
+ 'fixed',
+ 'inherit',
+ 'local',
+ 'scroll'
+ ],
+ 'background-clip': [
+ 'border-box',
+ 'content-box',
+ 'inherit',
+ 'padding-box',
+ 'text'
+ ],
+ 'background-origin': [
+ 'border-box',
+ 'content-box',
+ 'inherit',
+ 'padding-box'
+ ],
+ 'background-position': [
+ 'bottom',
+ 'center',
+ 'left',
+ 'right',
+ 'top'
+ ],
+ 'background-repeat': [
+ 'no-repeat',
+ 'inherit',
+ 'repeat',
+ 'repeat-x',
+ 'repeat-y',
+ 'round',
+ 'space'
+ ],
+ 'background-size': [
+ 'auto',
+ 'cover',
+ 'contain'
+ ],
+ 'border-collapse': [
+ 'collapse',
+ 'inherit',
+ 'separate'
+ ],
+ 'bottom': [
+ 'auto'
+ ],
+ 'clear': [
+ 'both',
+ 'left',
+ 'none',
+ 'right'
+ ],
+ 'color': [
+ 'transparent'
+ ],
+ 'cursor': [
+ 'all-scroll',
+ 'auto',
+ 'col-resize',
+ 'crosshair',
+ 'default',
+ 'e-resize',
+ 'help',
+ 'move',
+ 'n-resize',
+ 'ne-resize',
+ 'no-drop',
+ 'not-allowed',
+ 'nw-resize',
+ 'pointer',
+ 'progress',
+ 'row-resize',
+ 's-resize',
+ 'se-resize',
+ 'sw-resize',
+ 'text',
+ 'vertical-text',
+ 'w-resize',
+ 'wait'
+ ],
+ 'display': [
+ 'block',
+ 'inline',
+ 'inline-block',
+ 'inline-table',
+ 'list-item',
+ 'none',
+ 'table',
+ 'table-caption',
+ 'table-cell',
+ 'table-column',
+ 'table-column-group',
+ 'table-footer-group',
+ 'table-header-group',
+ 'table-row',
+ 'table-row-group'
+ ],
+ 'float': [
+ 'left',
+ 'none',
+ 'right'
+ ],
+ 'left': [
+ 'auto'
+ ],
+ 'font': [
+ 'caption',
+ 'icon',
+ 'menu',
+ 'message-box',
+ 'small-caption',
+ 'status-bar',
+ 'unset'
+ ],
+ 'font-size': [
+ 'large',
+ 'larger',
+ 'medium',
+ 'small',
+ 'smaller',
+ 'x-large',
+ 'x-small',
+ 'xx-large',
+ 'xx-small'
+ ],
+ 'font-stretch': [
+ 'condensed',
+ 'expanded',
+ 'extra-condensed',
+ 'extra-expanded',
+ 'normal',
+ 'semi-condensed',
+ 'semi-expanded',
+ 'ultra-condensed',
+ 'ultra-expanded'
+ ],
+ 'font-style': [
+ 'italic',
+ 'normal',
+ 'oblique'
+ ],
+ 'font-variant': [
+ 'normal',
+ 'small-caps'
+ ],
+ 'font-weight': [
+ '100',
+ '200',
+ '300',
+ '400',
+ '500',
+ '600',
+ '700',
+ '800',
+ '900',
+ 'bold',
+ 'bolder',
+ 'lighter',
+ 'normal'
+ ],
+ 'line-height': [
+ 'normal'
+ ],
+ 'list-style-position': [
+ 'inside',
+ 'outside'
+ ],
+ 'list-style-type': [
+ 'armenian',
+ 'circle',
+ 'decimal',
+ 'decimal-leading-zero',
+ 'disc',
+ 'decimal|disc', // this is the default value of list-style-type, see comment in configuration.js
+ 'georgian',
+ 'lower-alpha',
+ 'lower-greek',
+ 'lower-latin',
+ 'lower-roman',
+ 'none',
+ 'square',
+ 'upper-alpha',
+ 'upper-latin',
+ 'upper-roman'
+ ],
+ 'overflow': [
+ 'auto',
+ 'hidden',
+ 'scroll',
+ 'visible'
+ ],
+ 'position': [
+ 'absolute',
+ 'fixed',
+ 'relative',
+ 'static'
+ ],
+ 'right': [
+ 'auto'
+ ],
+ 'text-align': [
+ 'center',
+ 'justify',
+ 'left',
+ 'left|right', // this is the default value of list-style-type, see comment in configuration.js
+ 'right'
+ ],
+ 'text-decoration': [
+ 'line-through',
+ 'none',
+ 'overline',
+ 'underline'
+ ],
+ 'text-overflow': [
+ 'clip',
+ 'ellipsis'
+ ],
+ 'top': [
+ 'auto'
+ ],
+ 'vertical-align': [
+ 'baseline',
+ 'bottom',
+ 'middle',
+ 'sub',
+ 'super',
+ 'text-bottom',
+ 'text-top',
+ 'top'
+ ],
+ 'visibility': [
+ 'collapse',
+ 'hidden',
+ 'visible'
+ ],
+ 'white-space': [
+ 'normal',
+ 'nowrap',
+ 'pre'
+ ],
+ 'width': [
+ 'inherit',
+ 'initial',
+ 'medium',
+ 'thick',
+ 'thin'
+ ]
+};
+
+var Units = [
+ '%',
+ 'ch',
+ 'cm',
+ 'em',
+ 'ex',
+ 'in',
+ 'mm',
+ 'pc',
+ 'pt',
+ 'px',
+ 'rem',
+ 'vh',
+ 'vm',
+ 'vmax',
+ 'vmin',
+ 'vw'
+];
+
+function isColor(value) {
+ return value != 'auto' &&
+ (
+ isKeyword('color')(value) ||
+ isHexColor(value) ||
+ isColorFunction(value) ||
+ isNamedEntity(value)
+ );
+}
+
+function isColorFunction(value) {
+ return isRgbColor(value) || isHslColor(value);
+}
+
+function isDynamicUnit(value) {
+ return calcRegex.test(value);
+}
+
+function isFunction(value) {
+ return functionAnyRegex.test(value);
+}
+
+function isHexColor(value) {
+ return threeValueColorRegex.test(value) || fourValueColorRegex.test(value) || sixValueColorRegex.test(value) || eightValueColorRegex.test(value);
+}
+
+function isHslColor(value) {
+ return hslColorRegex.test(value);
+}
+
+function isHexAlphaColor(value) {
+ return hexAlphaColorRegex.test(value);
+}
+
+function isIdentifier(value) {
+ return identifierRegex.test(value);
+}
+
+function isQuotedText(value) {
+ return quotedTextRegex.test(value);
+}
+
+function isImage(value) {
+ return value == 'none' || value == 'inherit' || isUrl(value);
+}
+
+function isKeyword(propertyName) {
+ return function(value) {
+ return Keywords[propertyName].indexOf(value) > -1;
+ };
+}
+
+function isNamedEntity(value) {
+ return namedEntityRegex.test(value);
+}
+
+function isNumber(value) {
+ return scanForNumber(value) == value.length;
+}
+
+function isRgbColor(value) {
+ return rgbColorRegex.test(value);
+}
+
+function isPrefixed(value) {
+ return prefixRegex.test(value);
+}
+
+function isPositiveNumber(value) {
+ return isNumber(value) &&
+ parseFloat(value) >= 0;
+}
+
+function isVariable(value) {
+ return variableRegex.test(value);
+}
+
+function isTime(value) {
+ var numberUpTo = scanForNumber(value);
+
+ return numberUpTo == value.length && parseInt(value) === 0 ||
+ numberUpTo > -1 && validTimeUnits.indexOf(value.slice(numberUpTo + 1)) > -1 ||
+ isCalculatedTime(value);
+}
+
+function isCalculatedTime(value) {
+ return isFunction(value) && timeUnitPattern.test(value);
+}
+
+function isTimingFunction() {
+ var isTimingFunctionKeyword = isKeyword('*-timing-function');
+
+ return function (value) {
+ return isTimingFunctionKeyword(value) || timingFunctionRegex.test(value);
+ };
+}
+
+function isUnit(validUnits, value) {
+ var numberUpTo = scanForNumber(value);
+
+ return numberUpTo == value.length && parseInt(value) === 0 ||
+ numberUpTo > -1 && validUnits.indexOf(value.slice(numberUpTo + 1).toLowerCase()) > -1 ||
+ value == 'auto' ||
+ value == 'inherit';
+}
+
+function isUrl(value) {
+ return urlRegex.test(value);
+}
+
+function isZIndex(value) {
+ return value == 'auto' ||
+ isNumber(value) ||
+ isKeyword('^')(value);
+}
+
+function scanForNumber(value) {
+ var hasDot = false;
+ var hasSign = false;
+ var character;
+ var i, l;
+
+ for (i = 0, l = value.length; i < l; i++) {
+ character = value[i];
+
+ if (i === 0 && (character == PLUS_SIGN || character == MINUS_SIGN)) {
+ hasSign = true;
+ } else if (i > 0 && hasSign && (character == PLUS_SIGN || character == MINUS_SIGN)) {
+ return i - 1;
+ } else if (character == DECIMAL_DOT && !hasDot) {
+ hasDot = true;
+ } else if (character == DECIMAL_DOT && hasDot) {
+ return i - 1;
+ } else if (decimalRegex.test(character)) {
+ continue;
+ } else {
+ return i - 1;
+ }
+ }
+
+ return i;
+}
+
+function validator(compatibility) {
+ var validUnits = Units.slice(0).filter(function (value) {
+ return !(value in compatibility.units) || compatibility.units[value] === true;
+ });
+
+ if (compatibility.customUnits.rpx) {
+ validUnits.push('rpx');
+ }
+
+ return {
+ colorOpacity: compatibility.colors.opacity,
+ colorHexAlpha: compatibility.colors.hexAlpha,
+ isAnimationDirectionKeyword: isKeyword('animation-direction'),
+ isAnimationFillModeKeyword: isKeyword('animation-fill-mode'),
+ isAnimationIterationCountKeyword: isKeyword('animation-iteration-count'),
+ isAnimationNameKeyword: isKeyword('animation-name'),
+ isAnimationPlayStateKeyword: isKeyword('animation-play-state'),
+ isTimingFunction: isTimingFunction(),
+ isBackgroundAttachmentKeyword: isKeyword('background-attachment'),
+ isBackgroundClipKeyword: isKeyword('background-clip'),
+ isBackgroundOriginKeyword: isKeyword('background-origin'),
+ isBackgroundPositionKeyword: isKeyword('background-position'),
+ isBackgroundRepeatKeyword: isKeyword('background-repeat'),
+ isBackgroundSizeKeyword: isKeyword('background-size'),
+ isColor: isColor,
+ isColorFunction: isColorFunction,
+ isDynamicUnit: isDynamicUnit,
+ isFontKeyword: isKeyword('font'),
+ isFontSizeKeyword: isKeyword('font-size'),
+ isFontStretchKeyword: isKeyword('font-stretch'),
+ isFontStyleKeyword: isKeyword('font-style'),
+ isFontVariantKeyword: isKeyword('font-variant'),
+ isFontWeightKeyword: isKeyword('font-weight'),
+ isFunction: isFunction,
+ isGlobal: isKeyword('^'),
+ isHexAlphaColor: isHexAlphaColor,
+ isHslColor: isHslColor,
+ isIdentifier: isIdentifier,
+ isImage: isImage,
+ isKeyword: isKeyword,
+ isLineHeightKeyword: isKeyword('line-height'),
+ isListStylePositionKeyword: isKeyword('list-style-position'),
+ isListStyleTypeKeyword: isKeyword('list-style-type'),
+ isNumber: isNumber,
+ isPrefixed: isPrefixed,
+ isPositiveNumber: isPositiveNumber,
+ isQuotedText: isQuotedText,
+ isRgbColor: isRgbColor,
+ isStyleKeyword: isKeyword('*-style'),
+ isTime: isTime,
+ isUnit: isUnit.bind(null, validUnits),
+ isUrl: isUrl,
+ isVariable: isVariable,
+ isWidth: isKeyword('width'),
+ isZIndex: isZIndex
+ };
+}
+
+module.exports = validator;
+
+
+/***/ }),
+
+/***/ 3568:
+/***/ ((module) => {
+
+var VENDOR_PREFIX_PATTERN = /(?:^|\W)(\-\w+\-)/g;
+
+function unique(value) {
+ var prefixes = [];
+ var match;
+
+ while ((match = VENDOR_PREFIX_PATTERN.exec(value)) !== null) {
+ if (prefixes.indexOf(match[0]) == -1) {
+ prefixes.push(match[0]);
+ }
+ }
+
+ return prefixes;
+}
+
+function same(value1, value2) {
+ return unique(value1).sort().join(',') == unique(value2).sort().join(',');
+}
+
+module.exports = {
+ unique: unique,
+ same: same
+};
+
+
+/***/ }),
+
+/***/ 4082:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Hack = __webpack_require__(1084);
+
+var Marker = __webpack_require__(2638);
+var Token = __webpack_require__(7298);
+
+var Match = {
+ ASTERISK: '*',
+ BACKSLASH: '\\',
+ BANG: '!',
+ BANG_SUFFIX_PATTERN: /!\w+$/,
+ IMPORTANT_TOKEN: '!important',
+ IMPORTANT_TOKEN_PATTERN: new RegExp('!important$', 'i'),
+ IMPORTANT_WORD: 'important',
+ IMPORTANT_WORD_PATTERN: new RegExp('important$', 'i'),
+ SUFFIX_BANG_PATTERN: /!$/,
+ UNDERSCORE: '_',
+ VARIABLE_REFERENCE_PATTERN: /var\(--.+\)$/
+};
+
+function wrapAll(properties, skipProperties) {
+ var wrapped = [];
+ var single;
+ var property;
+ var i;
+
+ for (i = properties.length - 1; i >= 0; i--) {
+ property = properties[i];
+
+ if (property[0] != Token.PROPERTY) {
+ continue;
+ }
+
+ if (skipProperties && skipProperties.indexOf(property[1][1]) > -1) {
+ continue;
+ }
+
+ single = wrapSingle(property);
+ single.all = properties;
+ single.position = i;
+ wrapped.unshift(single);
+ }
+
+ return wrapped;
+}
+
+function someVariableReferences(property) {
+ var i, l;
+ var value;
+
+ // skipping `property` and property name tokens
+ for (i = 2, l = property.length; i < l; i++) {
+ value = property[i];
+
+ if (value[0] != Token.PROPERTY_VALUE) {
+ continue;
+ }
+
+ if (isVariableReference(value[1])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function isVariableReference(value) {
+ return Match.VARIABLE_REFERENCE_PATTERN.test(value);
+}
+
+function isMultiplex(property) {
+ var value;
+ var i, l;
+
+ for (i = 3, l = property.length; i < l; i++) {
+ value = property[i];
+
+ if (value[0] == Token.PROPERTY_VALUE && (value[1] == Marker.COMMA || value[1] == Marker.FORWARD_SLASH)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function hackFrom(property) {
+ var match = false;
+ var name = property[1][1];
+ var lastValue = property[property.length - 1];
+
+ if (name[0] == Match.UNDERSCORE) {
+ match = [Hack.UNDERSCORE];
+ } else if (name[0] == Match.ASTERISK) {
+ match = [Hack.ASTERISK];
+ } else if (lastValue[1][0] == Match.BANG && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN)) {
+ match = [Hack.BANG];
+ } else if (lastValue[1].indexOf(Match.BANG) > 0 && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN) && Match.BANG_SUFFIX_PATTERN.test(lastValue[1])) {
+ match = [Hack.BANG];
+ } else if (lastValue[1].indexOf(Match.BACKSLASH) > 0 && lastValue[1].indexOf(Match.BACKSLASH) == lastValue[1].length - Match.BACKSLASH.length - 1) {
+ match = [Hack.BACKSLASH, lastValue[1].substring(lastValue[1].indexOf(Match.BACKSLASH) + 1)];
+ } else if (lastValue[1].indexOf(Match.BACKSLASH) === 0 && lastValue[1].length == 2) {
+ match = [Hack.BACKSLASH, lastValue[1].substring(1)];
+ }
+
+ return match;
+}
+
+function isImportant(property) {
+ if (property.length < 3)
+ return false;
+
+ var lastValue = property[property.length - 1];
+ if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {
+ return true;
+ } else if (Match.IMPORTANT_WORD_PATTERN.test(lastValue[1]) && Match.SUFFIX_BANG_PATTERN.test(property[property.length - 2][1])) {
+ return true;
+ }
+
+ return false;
+}
+
+function stripImportant(property) {
+ var lastValue = property[property.length - 1];
+ var oneButLastValue = property[property.length - 2];
+
+ if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {
+ lastValue[1] = lastValue[1].replace(Match.IMPORTANT_TOKEN_PATTERN, '');
+ } else {
+ lastValue[1] = lastValue[1].replace(Match.IMPORTANT_WORD_PATTERN, '');
+ oneButLastValue[1] = oneButLastValue[1].replace(Match.SUFFIX_BANG_PATTERN, '');
+ }
+
+ if (lastValue[1].length === 0) {
+ property.pop();
+ }
+
+ if (oneButLastValue[1].length === 0) {
+ property.pop();
+ }
+}
+
+function stripPrefixHack(property) {
+ property[1][1] = property[1][1].substring(1);
+}
+
+function stripSuffixHack(property, hackFrom) {
+ var lastValue = property[property.length - 1];
+ lastValue[1] = lastValue[1]
+ .substring(0, lastValue[1].indexOf(hackFrom[0] == Hack.BACKSLASH ? Match.BACKSLASH : Match.BANG))
+ .trim();
+
+ if (lastValue[1].length === 0) {
+ property.pop();
+ }
+}
+
+function wrapSingle(property) {
+ var importantProperty = isImportant(property);
+ if (importantProperty) {
+ stripImportant(property);
+ }
+
+ var whichHack = hackFrom(property);
+ if (whichHack[0] == Hack.ASTERISK || whichHack[0] == Hack.UNDERSCORE) {
+ stripPrefixHack(property);
+ } else if (whichHack[0] == Hack.BACKSLASH || whichHack[0] == Hack.BANG) {
+ stripSuffixHack(property, whichHack);
+ }
+
+ return {
+ block: property[2] && property[2][0] == Token.PROPERTY_BLOCK,
+ components: [],
+ dirty: false,
+ dynamic: someVariableReferences(property),
+ hack: whichHack,
+ important: importantProperty,
+ name: property[1][1],
+ multiplex: property.length > 3 ? isMultiplex(property) : false,
+ optimizable: true,
+ position: 0,
+ shorthand: false,
+ unused: false,
+ value: property.slice(2)
+ };
+}
+
+module.exports = {
+ all: wrapAll,
+ single: wrapSingle
+};
+
+
+/***/ }),
+
+/***/ 4884:
+/***/ ((module) => {
+
+var DEFAULTS = {
+ '*': {
+ colors: {
+ hexAlpha: false, // 4- and 8-character hex notation
+ opacity: true // rgba / hsla
+ },
+ customUnits: {
+ rpx: false
+ },
+ properties: {
+ backgroundClipMerging: true, // background-clip to shorthand
+ backgroundOriginMerging: true, // background-origin to shorthand
+ backgroundSizeMerging: true, // background-size to shorthand
+ colors: true, // any kind of color transformations, like `#ff00ff` to `#f0f` or `#fff` into `red`
+ ieBangHack: false, // !ie suffix hacks on IE<8
+ ieFilters: false, // whether to preserve `filter` and `-ms-filter` properties
+ iePrefixHack: false, // underscore / asterisk prefix hacks on IE
+ ieSuffixHack: false, // \9 suffix hacks on IE6-9, \0 suffix hack on IE6-11
+ merging: true, // merging properties into one
+ shorterLengthUnits: false, // optimize pixel units into `pt`, `pc` or `in` units
+ spaceAfterClosingBrace: true, // 'url() no-repeat' to 'url()no-repeat'
+ urlQuotes: true, // whether to wrap content of `url()` into quotes or not
+ zeroUnits: true // 0[unit] -> 0
+ },
+ selectors: {
+ adjacentSpace: false, // div+ nav Android stock browser hack
+ ie7Hack: false, // *+html hack
+ mergeablePseudoClasses: [
+ ':active',
+ ':after',
+ ':before',
+ ':empty',
+ ':checked',
+ ':disabled',
+ ':empty',
+ ':enabled',
+ ':first-child',
+ ':first-letter',
+ ':first-line',
+ ':first-of-type',
+ ':focus',
+ ':hover',
+ ':lang',
+ ':last-child',
+ ':last-of-type',
+ ':link',
+ ':not',
+ ':nth-child',
+ ':nth-last-child',
+ ':nth-last-of-type',
+ ':nth-of-type',
+ ':only-child',
+ ':only-of-type',
+ ':root',
+ ':target',
+ ':visited'
+ ], // selectors with these pseudo-classes can be merged as these are universally supported
+ mergeablePseudoElements: [
+ '::after',
+ '::before',
+ '::first-letter',
+ '::first-line'
+ ], // selectors with these pseudo-elements can be merged as these are universally supported
+ mergeLimit: 8191, // number of rules that can be safely merged together
+ multiplePseudoMerging: true
+ },
+ units: {
+ ch: true,
+ in: true,
+ pc: true,
+ pt: true,
+ rem: true,
+ vh: true,
+ vm: true, // vm is vmin on IE9+ see https://developer.mozilla.org/en-US/docs/Web/CSS/length
+ vmax: true,
+ vmin: true,
+ vw: true
+ }
+ }
+};
+
+DEFAULTS.ie11 = merge(DEFAULTS['*'], {
+ properties: {
+ ieSuffixHack: true
+ }
+});
+
+DEFAULTS.ie10 = merge(DEFAULTS['*'], {
+ properties: {
+ ieSuffixHack: true
+ }
+});
+
+DEFAULTS.ie9 = merge(DEFAULTS['*'], {
+ properties: {
+ ieFilters: true,
+ ieSuffixHack: true
+ }
+});
+
+DEFAULTS.ie8 = merge(DEFAULTS.ie9, {
+ colors: {
+ opacity: false
+ },
+ properties: {
+ backgroundClipMerging: false,
+ backgroundOriginMerging: false,
+ backgroundSizeMerging: false,
+ iePrefixHack: true,
+ merging: false
+ },
+ selectors: {
+ mergeablePseudoClasses: [
+ ':after',
+ ':before',
+ ':first-child',
+ ':first-letter',
+ ':focus',
+ ':hover',
+ ':visited'
+ ],
+ mergeablePseudoElements: []
+ },
+ units: {
+ ch: false,
+ rem: false,
+ vh: false,
+ vm: false,
+ vmax: false,
+ vmin: false,
+ vw: false
+ }
+});
+
+DEFAULTS.ie7 = merge(DEFAULTS.ie8, {
+ properties: {
+ ieBangHack: true
+ },
+ selectors: {
+ ie7Hack: true,
+ mergeablePseudoClasses: [
+ ':first-child',
+ ':first-letter',
+ ':hover',
+ ':visited'
+ ]
+ },
+});
+
+function compatibilityFrom(source) {
+ return merge(DEFAULTS['*'], calculateSource(source));
+}
+
+function merge(source, target) {
+ for (var key in source) {
+ var value = source[key];
+
+ if (typeof value === 'object' && !Array.isArray(value)) {
+ target[key] = merge(value, target[key] || {});
+ } else {
+ target[key] = key in target ? target[key] : value;
+ }
+ }
+
+ return target;
+}
+
+function calculateSource(source) {
+ if (typeof source == 'object')
+ return source;
+
+ if (!/[,\+\-]/.test(source))
+ return DEFAULTS[source] || DEFAULTS['*'];
+
+ var parts = source.split(',');
+ var template = parts[0] in DEFAULTS ?
+ DEFAULTS[parts.shift()] :
+ DEFAULTS['*'];
+
+ source = {};
+
+ parts.forEach(function (part) {
+ var isAdd = part[0] == '+';
+ var key = part.substring(1).split('.');
+ var group = key[0];
+ var option = key[1];
+
+ source[group] = source[group] || {};
+ source[group][option] = isAdd;
+ });
+
+ return merge(template, source);
+}
+
+module.exports = compatibilityFrom;
+
+
+/***/ }),
+
+/***/ 7761:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var loadRemoteResource = __webpack_require__(9057);
+
+function fetchFrom(callback) {
+ return callback || loadRemoteResource;
+}
+
+module.exports = fetchFrom;
+
+
+/***/ }),
+
+/***/ 3320:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var systemLineBreak = __webpack_require__(2087).EOL;
+
+var override = __webpack_require__(817);
+
+var Breaks = {
+ AfterAtRule: 'afterAtRule',
+ AfterBlockBegins: 'afterBlockBegins',
+ AfterBlockEnds: 'afterBlockEnds',
+ AfterComment: 'afterComment',
+ AfterProperty: 'afterProperty',
+ AfterRuleBegins: 'afterRuleBegins',
+ AfterRuleEnds: 'afterRuleEnds',
+ BeforeBlockEnds: 'beforeBlockEnds',
+ BetweenSelectors: 'betweenSelectors'
+};
+
+var BreakWith = {
+ CarriageReturnLineFeed: '\r\n',
+ LineFeed: '\n',
+ System: systemLineBreak
+};
+
+var IndentWith = {
+ Space: ' ',
+ Tab: '\t'
+};
+
+var Spaces = {
+ AroundSelectorRelation: 'aroundSelectorRelation',
+ BeforeBlockBegins: 'beforeBlockBegins',
+ BeforeValue: 'beforeValue'
+};
+
+var DEFAULTS = {
+ breaks: breaks(false),
+ breakWith: BreakWith.System,
+ indentBy: 0,
+ indentWith: IndentWith.Space,
+ spaces: spaces(false),
+ wrapAt: false,
+ semicolonAfterLastProperty: false
+};
+
+var BEAUTIFY_ALIAS = 'beautify';
+var KEEP_BREAKS_ALIAS = 'keep-breaks';
+
+var OPTION_SEPARATOR = ';';
+var OPTION_NAME_VALUE_SEPARATOR = ':';
+var HASH_VALUES_OPTION_SEPARATOR = ',';
+var HASH_VALUES_NAME_VALUE_SEPARATOR = '=';
+
+var FALSE_KEYWORD_1 = 'false';
+var FALSE_KEYWORD_2 = 'off';
+var TRUE_KEYWORD_1 = 'true';
+var TRUE_KEYWORD_2 = 'on';
+
+function breaks(value) {
+ var breakOptions = {};
+
+ breakOptions[Breaks.AfterAtRule] = value;
+ breakOptions[Breaks.AfterBlockBegins] = value;
+ breakOptions[Breaks.AfterBlockEnds] = value;
+ breakOptions[Breaks.AfterComment] = value;
+ breakOptions[Breaks.AfterProperty] = value;
+ breakOptions[Breaks.AfterRuleBegins] = value;
+ breakOptions[Breaks.AfterRuleEnds] = value;
+ breakOptions[Breaks.BeforeBlockEnds] = value;
+ breakOptions[Breaks.BetweenSelectors] = value;
+
+ return breakOptions;
+}
+
+function spaces(value) {
+ var spaceOptions = {};
+
+ spaceOptions[Spaces.AroundSelectorRelation] = value;
+ spaceOptions[Spaces.BeforeBlockBegins] = value;
+ spaceOptions[Spaces.BeforeValue] = value;
+
+ return spaceOptions;
+}
+
+function formatFrom(source) {
+ if (source === undefined || source === false) {
+ return false;
+ }
+
+ if (typeof source == 'object' && 'breakWith' in source) {
+ source = override(source, { breakWith: mapBreakWith(source.breakWith) });
+ }
+
+ if (typeof source == 'object' && 'indentBy' in source) {
+ source = override(source, { indentBy: parseInt(source.indentBy) });
+ }
+
+ if (typeof source == 'object' && 'indentWith' in source) {
+ source = override(source, { indentWith: mapIndentWith(source.indentWith) });
+ }
+
+ if (typeof source == 'object') {
+ return remapBreaks(override(DEFAULTS, source));
+ }
+
+ if (typeof source == 'string' && source == BEAUTIFY_ALIAS) {
+ return remapBreaks(
+ override(DEFAULTS, {
+ breaks: breaks(true),
+ indentBy: 2,
+ spaces: spaces(true)
+ })
+ );
+ }
+
+ if (typeof source == 'string' && source == KEEP_BREAKS_ALIAS) {
+ return remapBreaks(
+ override(DEFAULTS, {
+ breaks: {
+ afterAtRule: true,
+ afterBlockBegins: true,
+ afterBlockEnds: true,
+ afterComment: true,
+ afterRuleEnds: true,
+ beforeBlockEnds: true
+ }
+ })
+ );
+ }
+
+ if (typeof source == 'string') {
+ return remapBreaks(override(DEFAULTS, toHash(source)));
+ }
+
+ return DEFAULTS;
+}
+
+function toHash(string) {
+ return string
+ .split(OPTION_SEPARATOR)
+ .reduce(function (accumulator, directive) {
+ var parts = directive.split(OPTION_NAME_VALUE_SEPARATOR);
+ var name = parts[0];
+ var value = parts[1];
+
+ if (name == 'breaks' || name == 'spaces') {
+ accumulator[name] = hashValuesToHash(value);
+ } else if (name == 'indentBy' || name == 'wrapAt') {
+ accumulator[name] = parseInt(value);
+ } else if (name == 'indentWith') {
+ accumulator[name] = mapIndentWith(value);
+ } else if (name == 'breakWith') {
+ accumulator[name] = mapBreakWith(value);
+ }
+
+ return accumulator;
+ }, {});
+}
+
+function hashValuesToHash(string) {
+ return string
+ .split(HASH_VALUES_OPTION_SEPARATOR)
+ .reduce(function (accumulator, directive) {
+ var parts = directive.split(HASH_VALUES_NAME_VALUE_SEPARATOR);
+ var name = parts[0];
+ var value = parts[1];
+
+ accumulator[name] = normalizeValue(value);
+
+ return accumulator;
+ }, {});
+}
+
+
+function normalizeValue(value) {
+ switch (value) {
+ case FALSE_KEYWORD_1:
+ case FALSE_KEYWORD_2:
+ return false;
+ case TRUE_KEYWORD_1:
+ case TRUE_KEYWORD_2:
+ return true;
+ default:
+ return value;
+ }
+}
+
+function mapBreakWith(value) {
+ switch (value) {
+ case 'windows':
+ case 'crlf':
+ case BreakWith.CarriageReturnLineFeed:
+ return BreakWith.CarriageReturnLineFeed;
+ case 'unix':
+ case 'lf':
+ case BreakWith.LineFeed:
+ return BreakWith.LineFeed;
+ default:
+ return systemLineBreak;
+ }
+}
+
+function mapIndentWith(value) {
+ switch (value) {
+ case 'space':
+ return IndentWith.Space;
+ case 'tab':
+ return IndentWith.Tab;
+ default:
+ return value;
+ }
+}
+
+function remapBreaks(source) {
+ for (var key in Breaks) {
+ var breakName = Breaks[key];
+ var breakValue = source.breaks[breakName];
+
+ if (breakValue === true) {
+ source.breaks[breakName] = source.breakWith;
+ } else if (breakValue === false) {
+ source.breaks[breakName] = '';
+ } else {
+ source.breaks[breakName] = source.breakWith.repeat(parseInt(breakValue));
+ }
+ }
+
+ return source;
+}
+
+module.exports = {
+ Breaks: Breaks,
+ Spaces: Spaces,
+ formatFrom: formatFrom
+};
+
+
+/***/ }),
+
+/***/ 9618:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var url = __webpack_require__(8835);
+
+var override = __webpack_require__(817);
+
+function inlineRequestFrom(option) {
+ return override(
+ /* jshint camelcase: false */
+ proxyOptionsFrom(process.env.HTTP_PROXY || process.env.http_proxy),
+ option || {}
+ );
+}
+
+function proxyOptionsFrom(httpProxy) {
+ return httpProxy ?
+ {
+ hostname: url.parse(httpProxy).hostname,
+ port: parseInt(url.parse(httpProxy).port)
+ } :
+ {};
+}
+
+module.exports = inlineRequestFrom;
+
+
+/***/ }),
+
+/***/ 3712:
+/***/ ((module) => {
+
+var DEFAULT_TIMEOUT = 5000;
+
+function inlineTimeoutFrom(option) {
+ return option || DEFAULT_TIMEOUT;
+}
+
+module.exports = inlineTimeoutFrom;
+
+
+/***/ }),
+
+/***/ 4962:
+/***/ ((module) => {
+
+function inlineOptionsFrom(rules) {
+ if (Array.isArray(rules)) {
+ return rules;
+ }
+
+ if (rules === false) {
+ return ['none'];
+ }
+
+ return undefined === rules ?
+ ['local'] :
+ rules.split(',');
+}
+
+module.exports = inlineOptionsFrom;
+
+
+/***/ }),
+
+/***/ 722:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var roundingPrecisionFrom = __webpack_require__(6241).roundingPrecisionFrom;
+
+var override = __webpack_require__(817);
+
+var OptimizationLevel = {
+ Zero: '0',
+ One: '1',
+ Two: '2'
+};
+
+var DEFAULTS = {};
+
+DEFAULTS[OptimizationLevel.Zero] = {};
+DEFAULTS[OptimizationLevel.One] = {
+ cleanupCharsets: true,
+ normalizeUrls: true,
+ optimizeBackground: true,
+ optimizeBorderRadius: true,
+ optimizeFilter: true,
+ optimizeFontWeight: true,
+ optimizeOutline: true,
+ removeEmpty: true,
+ removeNegativePaddings: true,
+ removeQuotes: true,
+ removeWhitespace: true,
+ replaceMultipleZeros: true,
+ replaceTimeUnits: true,
+ replaceZeroUnits: true,
+ roundingPrecision: roundingPrecisionFrom(undefined),
+ selectorsSortingMethod: 'standard',
+ specialComments: 'all',
+ tidyAtRules: true,
+ tidyBlockScopes: true,
+ tidySelectors: true
+};
+DEFAULTS[OptimizationLevel.Two] = {
+ mergeAdjacentRules: true,
+ mergeIntoShorthands: true,
+ mergeMedia: true,
+ mergeNonAdjacentRules: true,
+ mergeSemantically: false,
+ overrideProperties: true,
+ removeEmpty: true,
+ reduceNonAdjacentRules: true,
+ removeDuplicateFontRules: true,
+ removeDuplicateMediaBlocks: true,
+ removeDuplicateRules: true,
+ removeUnusedAtRules: false,
+ restructureRules: false,
+ skipProperties: []
+};
+
+var ALL_KEYWORD_1 = '*';
+var ALL_KEYWORD_2 = 'all';
+var FALSE_KEYWORD_1 = 'false';
+var FALSE_KEYWORD_2 = 'off';
+var TRUE_KEYWORD_1 = 'true';
+var TRUE_KEYWORD_2 = 'on';
+
+var LIST_VALUE_SEPARATOR = ',';
+var OPTION_SEPARATOR = ';';
+var OPTION_VALUE_SEPARATOR = ':';
+
+function optimizationLevelFrom(source) {
+ var level = override(DEFAULTS, {});
+ var Zero = OptimizationLevel.Zero;
+ var One = OptimizationLevel.One;
+ var Two = OptimizationLevel.Two;
+
+ if (undefined === source) {
+ delete level[Two];
+ return level;
+ }
+
+ if (typeof source == 'string') {
+ source = parseInt(source);
+ }
+
+ if (typeof source == 'number' && source === parseInt(Two)) {
+ return level;
+ }
+
+ if (typeof source == 'number' && source === parseInt(One)) {
+ delete level[Two];
+ return level;
+ }
+
+ if (typeof source == 'number' && source === parseInt(Zero)) {
+ delete level[Two];
+ delete level[One];
+ return level;
+ }
+
+ if (typeof source == 'object') {
+ source = covertValuesToHashes(source);
+ }
+
+ if (One in source && 'roundingPrecision' in source[One]) {
+ source[One].roundingPrecision = roundingPrecisionFrom(source[One].roundingPrecision);
+ }
+
+ if (Two in source && 'skipProperties' in source[Two] && typeof(source[Two].skipProperties) == 'string') {
+ source[Two].skipProperties = source[Two].skipProperties.split(LIST_VALUE_SEPARATOR);
+ }
+
+ if (Zero in source || One in source || Two in source) {
+ level[Zero] = override(level[Zero], source[Zero]);
+ }
+
+ if (One in source && ALL_KEYWORD_1 in source[One]) {
+ level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_1])));
+ delete source[One][ALL_KEYWORD_1];
+ }
+
+ if (One in source && ALL_KEYWORD_2 in source[One]) {
+ level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_2])));
+ delete source[One][ALL_KEYWORD_2];
+ }
+
+ if (One in source || Two in source) {
+ level[One] = override(level[One], source[One]);
+ } else {
+ delete level[One];
+ }
+
+ if (Two in source && ALL_KEYWORD_1 in source[Two]) {
+ level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_1])));
+ delete source[Two][ALL_KEYWORD_1];
+ }
+
+ if (Two in source && ALL_KEYWORD_2 in source[Two]) {
+ level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_2])));
+ delete source[Two][ALL_KEYWORD_2];
+ }
+
+ if (Two in source) {
+ level[Two] = override(level[Two], source[Two]);
+ } else {
+ delete level[Two];
+ }
+
+ return level;
+}
+
+function defaults(level, value) {
+ var options = override(DEFAULTS[level], {});
+ var key;
+
+ for (key in options) {
+ if (typeof options[key] == 'boolean') {
+ options[key] = value;
+ }
+ }
+
+ return options;
+}
+
+function normalizeValue(value) {
+ switch (value) {
+ case FALSE_KEYWORD_1:
+ case FALSE_KEYWORD_2:
+ return false;
+ case TRUE_KEYWORD_1:
+ case TRUE_KEYWORD_2:
+ return true;
+ default:
+ return value;
+ }
+}
+
+function covertValuesToHashes(source) {
+ var clonedSource = override(source, {});
+ var level;
+ var i;
+
+ for (i = 0; i <= 2; i++) {
+ level = '' + i;
+
+ if (level in clonedSource && (clonedSource[level] === undefined || clonedSource[level] === false)) {
+ delete clonedSource[level];
+ }
+
+ if (level in clonedSource && clonedSource[level] === true) {
+ clonedSource[level] = {};
+ }
+
+ if (level in clonedSource && typeof clonedSource[level] == 'string') {
+ clonedSource[level] = covertToHash(clonedSource[level], level);
+ }
+ }
+
+ return clonedSource;
+}
+
+function covertToHash(asString, level) {
+ return asString
+ .split(OPTION_SEPARATOR)
+ .reduce(function (accumulator, directive) {
+ var parts = directive.split(OPTION_VALUE_SEPARATOR);
+ var name = parts[0];
+ var value = parts[1];
+ var normalizedValue = normalizeValue(value);
+
+ if (ALL_KEYWORD_1 == name || ALL_KEYWORD_2 == name) {
+ accumulator = override(accumulator, defaults(level, normalizedValue));
+ } else {
+ accumulator[name] = normalizedValue;
+ }
+
+ return accumulator;
+ }, {});
+}
+
+module.exports = {
+ OptimizationLevel: OptimizationLevel,
+ optimizationLevelFrom: optimizationLevelFrom,
+};
+
+
+/***/ }),
+
+/***/ 4634:
+/***/ ((module) => {
+
+function pluginsFrom(plugins) {
+ var flatPlugins = {
+ level1Value: [],
+ level1Property: [],
+ level2Block: []
+ };
+
+ plugins = plugins || [];
+
+ flatPlugins.level1Value = plugins
+ .map(function (plugin) { return plugin.level1 && plugin.level1.value; })
+ .filter(function (plugin) { return plugin != null; });
+
+ flatPlugins.level1Property = plugins
+ .map(function (plugin) { return plugin.level1 && plugin.level1.property; })
+ .filter(function (plugin) { return plugin != null; });
+
+ flatPlugins.level2Block = plugins
+ .map(function (plugin) { return plugin.level2 && plugin.level2.block; })
+ .filter(function (plugin) { return plugin != null; });
+
+ return flatPlugins;
+}
+
+module.exports = pluginsFrom;
+
+
+/***/ }),
+
+/***/ 433:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var path = __webpack_require__(5622);
+
+function rebaseToFrom(option) {
+ return option ? path.resolve(option) : process.cwd();
+}
+
+module.exports = rebaseToFrom;
+
+
+/***/ }),
+
+/***/ 7928:
+/***/ ((module) => {
+
+function rebaseFrom(rebaseOption, rebaseToOption) {
+ if (undefined !== rebaseToOption) {
+ return true;
+ } else if (undefined === rebaseOption) {
+ return false;
+ } else {
+ return !!rebaseOption;
+ }
+}
+
+module.exports = rebaseFrom;
+
+
+/***/ }),
+
+/***/ 6241:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var override = __webpack_require__(817);
+
+var INTEGER_PATTERN = /^\d+$/;
+
+var ALL_UNITS = ['*', 'all'];
+var DEFAULT_PRECISION = 'off'; // all precision changes are disabled
+var DIRECTIVES_SEPARATOR = ','; // e.g. *=5,px=3
+var DIRECTIVE_VALUE_SEPARATOR = '='; // e.g. *=5
+
+function roundingPrecisionFrom(source) {
+ return override(defaults(DEFAULT_PRECISION), buildPrecisionFrom(source));
+}
+
+function defaults(value) {
+ return {
+ 'ch': value,
+ 'cm': value,
+ 'em': value,
+ 'ex': value,
+ 'in': value,
+ 'mm': value,
+ 'pc': value,
+ 'pt': value,
+ 'px': value,
+ 'q': value,
+ 'rem': value,
+ 'vh': value,
+ 'vmax': value,
+ 'vmin': value,
+ 'vw': value,
+ '%': value
+ };
+}
+
+function buildPrecisionFrom(source) {
+ if (source === null || source === undefined) {
+ return {};
+ }
+
+ if (typeof source == 'boolean') {
+ return {};
+ }
+
+ if (typeof source == 'number' && source == -1) {
+ return defaults(DEFAULT_PRECISION);
+ }
+
+ if (typeof source == 'number') {
+ return defaults(source);
+ }
+
+ if (typeof source == 'string' && INTEGER_PATTERN.test(source)) {
+ return defaults(parseInt(source));
+ }
+
+ if (typeof source == 'string' && source == DEFAULT_PRECISION) {
+ return defaults(DEFAULT_PRECISION);
+ }
+
+ if (typeof source == 'object') {
+ return source;
+ }
+
+ return source
+ .split(DIRECTIVES_SEPARATOR)
+ .reduce(function (accumulator, directive) {
+ var directiveParts = directive.split(DIRECTIVE_VALUE_SEPARATOR);
+ var name = directiveParts[0];
+ var value = parseInt(directiveParts[1]);
+
+ if (isNaN(value) || value == -1) {
+ value = DEFAULT_PRECISION;
+ }
+
+ if (ALL_UNITS.indexOf(name) > -1) {
+ accumulator = override(accumulator, defaults(value));
+ } else {
+ accumulator[name] = value;
+ }
+
+ return accumulator;
+ }, {});
+}
+
+module.exports = {
+ DEFAULT: DEFAULT_PRECISION,
+ roundingPrecisionFrom: roundingPrecisionFrom
+};
+
+
+/***/ }),
+
+/***/ 6913:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var fs = __webpack_require__(5747);
+var path = __webpack_require__(5622);
+
+var isAllowedResource = __webpack_require__(3972);
+var matchDataUri = __webpack_require__(5204);
+var rebaseLocalMap = __webpack_require__(629);
+var rebaseRemoteMap = __webpack_require__(329);
+
+var Token = __webpack_require__(7298);
+var hasProtocol = __webpack_require__(1865);
+var isDataUriResource = __webpack_require__(8530);
+var isRemoteResource = __webpack_require__(793);
+
+var MAP_MARKER_PATTERN = /^\/\*# sourceMappingURL=(\S+) \*\/$/;
+
+function applySourceMaps(tokens, context, callback) {
+ var applyContext = {
+ callback: callback,
+ fetch: context.options.fetch,
+ index: 0,
+ inline: context.options.inline,
+ inlineRequest: context.options.inlineRequest,
+ inlineTimeout: context.options.inlineTimeout,
+ inputSourceMapTracker: context.inputSourceMapTracker,
+ localOnly: context.localOnly,
+ processedTokens: [],
+ rebaseTo: context.options.rebaseTo,
+ sourceTokens: tokens,
+ warnings: context.warnings
+ };
+
+ return context.options.sourceMap && tokens.length > 0 ?
+ doApplySourceMaps(applyContext) :
+ callback(tokens);
+}
+
+function doApplySourceMaps(applyContext) {
+ var singleSourceTokens = [];
+ var lastSource = findTokenSource(applyContext.sourceTokens[0]);
+ var source;
+ var token;
+ var l;
+
+ for (l = applyContext.sourceTokens.length; applyContext.index < l; applyContext.index++) {
+ token = applyContext.sourceTokens[applyContext.index];
+ source = findTokenSource(token);
+
+ if (source != lastSource) {
+ singleSourceTokens = [];
+ lastSource = source;
+ }
+
+ singleSourceTokens.push(token);
+ applyContext.processedTokens.push(token);
+
+ if (token[0] == Token.COMMENT && MAP_MARKER_PATTERN.test(token[1])) {
+ return fetchAndApplySourceMap(token[1], source, singleSourceTokens, applyContext);
+ }
+ }
+
+ return applyContext.callback(applyContext.processedTokens);
+}
+
+function findTokenSource(token) {
+ var scope;
+ var metadata;
+
+ if (token[0] == Token.AT_RULE || token[0] == Token.COMMENT || token[0] == Token.RAW) {
+ metadata = token[2][0];
+ } else {
+ scope = token[1][0];
+ metadata = scope[2][0];
+ }
+
+ return metadata[2];
+}
+
+function fetchAndApplySourceMap(sourceMapComment, source, singleSourceTokens, applyContext) {
+ return extractInputSourceMapFrom(sourceMapComment, applyContext, function (inputSourceMap) {
+ if (inputSourceMap) {
+ applyContext.inputSourceMapTracker.track(source, inputSourceMap);
+ applySourceMapRecursively(singleSourceTokens, applyContext.inputSourceMapTracker);
+ }
+
+ applyContext.index++;
+ return doApplySourceMaps(applyContext);
+ });
+}
+
+function extractInputSourceMapFrom(sourceMapComment, applyContext, whenSourceMapReady) {
+ var uri = MAP_MARKER_PATTERN.exec(sourceMapComment)[1];
+ var absoluteUri;
+ var sourceMap;
+ var rebasedMap;
+
+ if (isDataUriResource(uri)) {
+ sourceMap = extractInputSourceMapFromDataUri(uri);
+ return whenSourceMapReady(sourceMap);
+ } else if (isRemoteResource(uri)) {
+ return loadInputSourceMapFromRemoteUri(uri, applyContext, function (sourceMap) {
+ var parsedMap;
+
+ if (sourceMap) {
+ parsedMap = JSON.parse(sourceMap);
+ rebasedMap = rebaseRemoteMap(parsedMap, uri);
+ whenSourceMapReady(rebasedMap);
+ } else {
+ whenSourceMapReady(null);
+ }
+ });
+ } else {
+ // at this point `uri` is already rebased, see lib/reader/rebase.js#rebaseSourceMapComment
+ // it is rebased to be consistent with rebasing other URIs
+ // however here we need to resolve it back to read it from disk
+ absoluteUri = path.resolve(applyContext.rebaseTo, uri);
+ sourceMap = loadInputSourceMapFromLocalUri(absoluteUri, applyContext);
+
+ if (sourceMap) {
+ rebasedMap = rebaseLocalMap(sourceMap, absoluteUri, applyContext.rebaseTo);
+ return whenSourceMapReady(rebasedMap);
+ } else {
+ return whenSourceMapReady(null);
+ }
+ }
+}
+
+function extractInputSourceMapFromDataUri(uri) {
+ var dataUriMatch = matchDataUri(uri);
+ var charset = dataUriMatch[2] ? dataUriMatch[2].split(/[=;]/)[2] : 'us-ascii';
+ var encoding = dataUriMatch[3] ? dataUriMatch[3].split(';')[1] : 'utf8';
+ var data = encoding == 'utf8' ? global.unescape(dataUriMatch[4]) : dataUriMatch[4];
+
+ var buffer = Buffer.from(data, encoding);
+ buffer.charset = charset;
+
+ return JSON.parse(buffer.toString());
+}
+
+function loadInputSourceMapFromRemoteUri(uri, applyContext, whenLoaded) {
+ var isAllowed = isAllowedResource(uri, true, applyContext.inline);
+ var isRuntimeResource = !hasProtocol(uri);
+
+ if (applyContext.localOnly) {
+ applyContext.warnings.push('Cannot fetch remote resource from "' + uri + '" as no callback given.');
+ return whenLoaded(null);
+ } else if (isRuntimeResource) {
+ applyContext.warnings.push('Cannot fetch "' + uri + '" as no protocol given.');
+ return whenLoaded(null);
+ } else if (!isAllowed) {
+ applyContext.warnings.push('Cannot fetch "' + uri + '" as resource is not allowed.');
+ return whenLoaded(null);
+ }
+
+ applyContext.fetch(uri, applyContext.inlineRequest, applyContext.inlineTimeout, function (error, body) {
+ if (error) {
+ applyContext.warnings.push('Missing source map at "' + uri + '" - ' + error);
+ return whenLoaded(null);
+ }
+
+ whenLoaded(body);
+ });
+}
+
+function loadInputSourceMapFromLocalUri(uri, applyContext) {
+ var isAllowed = isAllowedResource(uri, false, applyContext.inline);
+ var sourceMap;
+
+ if (!fs.existsSync(uri) || !fs.statSync(uri).isFile()) {
+ applyContext.warnings.push('Ignoring local source map at "' + uri + '" as resource is missing.');
+ return null;
+ } else if (!isAllowed) {
+ applyContext.warnings.push('Cannot fetch "' + uri + '" as resource is not allowed.');
+ return null;
+ }
+
+ sourceMap = fs.readFileSync(uri, 'utf-8');
+ return JSON.parse(sourceMap);
+}
+
+function applySourceMapRecursively(tokens, inputSourceMapTracker) {
+ var token;
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ token = tokens[i];
+
+ switch (token[0]) {
+ case Token.AT_RULE:
+ applySourceMapTo(token, inputSourceMapTracker);
+ break;
+ case Token.AT_RULE_BLOCK:
+ applySourceMapRecursively(token[1], inputSourceMapTracker);
+ applySourceMapRecursively(token[2], inputSourceMapTracker);
+ break;
+ case Token.AT_RULE_BLOCK_SCOPE:
+ applySourceMapTo(token, inputSourceMapTracker);
+ break;
+ case Token.NESTED_BLOCK:
+ applySourceMapRecursively(token[1], inputSourceMapTracker);
+ applySourceMapRecursively(token[2], inputSourceMapTracker);
+ break;
+ case Token.NESTED_BLOCK_SCOPE:
+ applySourceMapTo(token, inputSourceMapTracker);
+ break;
+ case Token.COMMENT:
+ applySourceMapTo(token, inputSourceMapTracker);
+ break;
+ case Token.PROPERTY:
+ applySourceMapRecursively(token, inputSourceMapTracker);
+ break;
+ case Token.PROPERTY_BLOCK:
+ applySourceMapRecursively(token[1], inputSourceMapTracker);
+ break;
+ case Token.PROPERTY_NAME:
+ applySourceMapTo(token, inputSourceMapTracker);
+ break;
+ case Token.PROPERTY_VALUE:
+ applySourceMapTo(token, inputSourceMapTracker);
+ break;
+ case Token.RULE:
+ applySourceMapRecursively(token[1], inputSourceMapTracker);
+ applySourceMapRecursively(token[2], inputSourceMapTracker);
+ break;
+ case Token.RULE_SCOPE:
+ applySourceMapTo(token, inputSourceMapTracker);
+ }
+ }
+
+ return tokens;
+}
+
+function applySourceMapTo(token, inputSourceMapTracker) {
+ var value = token[1];
+ var metadata = token[2];
+ var newMetadata = [];
+ var i, l;
+
+ for (i = 0, l = metadata.length; i < l; i++) {
+ newMetadata.push(inputSourceMapTracker.originalPositionFor(metadata[i], value.length));
+ }
+
+ token[2] = newMetadata;
+}
+
+module.exports = applySourceMaps;
+
+
+/***/ }),
+
+/***/ 8713:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var split = __webpack_require__(8794);
+
+var BRACE_PREFIX = /^\(/;
+var BRACE_SUFFIX = /\)$/;
+var IMPORT_PREFIX_PATTERN = /^@import/i;
+var QUOTE_PREFIX_PATTERN = /['"]\s*/;
+var QUOTE_SUFFIX_PATTERN = /\s*['"]/;
+var URL_PREFIX_PATTERN = /^url\(\s*/i;
+var URL_SUFFIX_PATTERN = /\s*\)/i;
+
+function extractImportUrlAndMedia(atRuleValue) {
+ var uri;
+ var mediaQuery;
+ var stripped;
+ var parts;
+
+ stripped = atRuleValue
+ .replace(IMPORT_PREFIX_PATTERN, '')
+ .trim()
+ .replace(URL_PREFIX_PATTERN, '(')
+ .replace(URL_SUFFIX_PATTERN, ')')
+ .replace(QUOTE_PREFIX_PATTERN, '')
+ .replace(QUOTE_SUFFIX_PATTERN, '');
+
+ parts = split(stripped, ' ');
+
+ uri = parts[0]
+ .replace(BRACE_PREFIX, '')
+ .replace(BRACE_SUFFIX, '');
+ mediaQuery = parts.slice(1).join(' ');
+
+ return [uri, mediaQuery];
+}
+
+module.exports = extractImportUrlAndMedia;
+
+
+/***/ }),
+
+/***/ 6965:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var SourceMapConsumer = __webpack_require__(6389).SourceMapConsumer;
+
+function inputSourceMapTracker() {
+ var maps = {};
+
+ return {
+ all: all.bind(null, maps),
+ isTracking: isTracking.bind(null, maps),
+ originalPositionFor: originalPositionFor.bind(null, maps),
+ track: track.bind(null, maps)
+ };
+}
+
+function all(maps) {
+ return maps;
+}
+
+function isTracking(maps, source) {
+ return source in maps;
+}
+
+function originalPositionFor(maps, metadata, range, selectorFallbacks) {
+ var line = metadata[0];
+ var column = metadata[1];
+ var source = metadata[2];
+ var position = {
+ line: line,
+ column: column + range
+ };
+ var originalPosition;
+
+ while (!originalPosition && position.column > column) {
+ position.column--;
+ originalPosition = maps[source].originalPositionFor(position);
+ }
+
+ if (!originalPosition || originalPosition.column < 0) {
+ return metadata;
+ }
+
+ if (originalPosition.line === null && line > 1 && selectorFallbacks > 0) {
+ return originalPositionFor(maps, [line - 1, column, source], range, selectorFallbacks - 1);
+ }
+
+ return originalPosition.line !== null ?
+ toMetadata(originalPosition) :
+ metadata;
+}
+
+function toMetadata(asHash) {
+ return [asHash.line, asHash.column, asHash.source];
+}
+
+function track(maps, source, data) {
+ maps[source] = new SourceMapConsumer(data);
+}
+
+module.exports = inputSourceMapTracker;
+
+
+/***/ }),
+
+/***/ 3972:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var path = __webpack_require__(5622);
+var url = __webpack_require__(8835);
+
+var isRemoteResource = __webpack_require__(793);
+var hasProtocol = __webpack_require__(1865);
+
+var HTTP_PROTOCOL = 'http:';
+
+function isAllowedResource(uri, isRemote, rules) {
+ var match;
+ var absoluteUri;
+ var allowed = isRemote ? false : true;
+ var rule;
+ var isNegated;
+ var normalizedRule;
+ var i;
+
+ if (rules.length === 0) {
+ return false;
+ }
+
+ if (isRemote && !hasProtocol(uri)) {
+ uri = HTTP_PROTOCOL + uri;
+ }
+
+ match = isRemote ?
+ url.parse(uri).host :
+ uri;
+
+ absoluteUri = isRemote ?
+ uri :
+ path.resolve(uri);
+
+ for (i = 0; i < rules.length; i++) {
+ rule = rules[i];
+ isNegated = rule[0] == '!';
+ normalizedRule = rule.substring(1);
+
+ if (isNegated && isRemote && isRemoteRule(normalizedRule)) {
+ allowed = allowed && !isAllowedResource(uri, true, [normalizedRule]);
+ } else if (isNegated && !isRemote && !isRemoteRule(normalizedRule)) {
+ allowed = allowed && !isAllowedResource(uri, false, [normalizedRule]);
+ } else if (isNegated) {
+ allowed = allowed && true;
+ } else if (rule == 'all') {
+ allowed = true;
+ } else if (isRemote && rule == 'local') {
+ allowed = allowed || false;
+ } else if (isRemote && rule == 'remote') {
+ allowed = true;
+ } else if (!isRemote && rule == 'remote') {
+ allowed = false;
+ } else if (!isRemote && rule == 'local') {
+ allowed = true;
+ } else if (rule === match) {
+ allowed = true;
+ } else if (rule === uri) {
+ allowed = true;
+ } else if (isRemote && absoluteUri.indexOf(rule) === 0) {
+ allowed = true;
+ } else if (!isRemote && absoluteUri.indexOf(path.resolve(rule)) === 0) {
+ allowed = true;
+ } else if (isRemote != isRemoteRule(normalizedRule)) {
+ allowed = allowed && true;
+ } else {
+ allowed = false;
+ }
+ }
+
+ return allowed;
+}
+
+function isRemoteRule(rule) {
+ return isRemoteResource(rule) || url.parse(HTTP_PROTOCOL + '//' + rule).host == rule;
+}
+
+module.exports = isAllowedResource;
+
+
+/***/ }),
+
+/***/ 3943:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var fs = __webpack_require__(5747);
+var path = __webpack_require__(5622);
+
+var isAllowedResource = __webpack_require__(3972);
+
+var hasProtocol = __webpack_require__(1865);
+var isRemoteResource = __webpack_require__(793);
+
+function loadOriginalSources(context, callback) {
+ var loadContext = {
+ callback: callback,
+ fetch: context.options.fetch,
+ index: 0,
+ inline: context.options.inline,
+ inlineRequest: context.options.inlineRequest,
+ inlineTimeout: context.options.inlineTimeout,
+ localOnly: context.localOnly,
+ rebaseTo: context.options.rebaseTo,
+ sourcesContent: context.sourcesContent,
+ uriToSource: uriToSourceMapping(context.inputSourceMapTracker.all()),
+ warnings: context.warnings
+ };
+
+ return context.options.sourceMap && context.options.sourceMapInlineSources ?
+ doLoadOriginalSources(loadContext) :
+ callback();
+}
+
+function uriToSourceMapping(allSourceMapConsumers) {
+ var mapping = {};
+ var consumer;
+ var uri;
+ var source;
+ var i, l;
+
+ for (source in allSourceMapConsumers) {
+ consumer = allSourceMapConsumers[source];
+
+ for (i = 0, l = consumer.sources.length; i < l; i++) {
+ uri = consumer.sources[i];
+ source = consumer.sourceContentFor(uri, true);
+
+ mapping[uri] = source;
+ }
+ }
+
+ return mapping;
+}
+
+function doLoadOriginalSources(loadContext) {
+ var uris = Object.keys(loadContext.uriToSource);
+ var uri;
+ var source;
+ var total;
+
+ for (total = uris.length; loadContext.index < total; loadContext.index++) {
+ uri = uris[loadContext.index];
+ source = loadContext.uriToSource[uri];
+
+ if (source) {
+ loadContext.sourcesContent[uri] = source;
+ } else {
+ return loadOriginalSource(uri, loadContext);
+ }
+ }
+
+ return loadContext.callback();
+}
+
+function loadOriginalSource(uri, loadContext) {
+ var content;
+
+ if (isRemoteResource(uri)) {
+ return loadOriginalSourceFromRemoteUri(uri, loadContext, function (content) {
+ loadContext.index++;
+ loadContext.sourcesContent[uri] = content;
+ return doLoadOriginalSources(loadContext);
+ });
+ } else {
+ content = loadOriginalSourceFromLocalUri(uri, loadContext);
+ loadContext.index++;
+ loadContext.sourcesContent[uri] = content;
+ return doLoadOriginalSources(loadContext);
+ }
+}
+
+function loadOriginalSourceFromRemoteUri(uri, loadContext, whenLoaded) {
+ var isAllowed = isAllowedResource(uri, true, loadContext.inline);
+ var isRuntimeResource = !hasProtocol(uri);
+
+ if (loadContext.localOnly) {
+ loadContext.warnings.push('Cannot fetch remote resource from "' + uri + '" as no callback given.');
+ return whenLoaded(null);
+ } else if (isRuntimeResource) {
+ loadContext.warnings.push('Cannot fetch "' + uri + '" as no protocol given.');
+ return whenLoaded(null);
+ } else if (!isAllowed) {
+ loadContext.warnings.push('Cannot fetch "' + uri + '" as resource is not allowed.');
+ return whenLoaded(null);
+ }
+
+ loadContext.fetch(uri, loadContext.inlineRequest, loadContext.inlineTimeout, function (error, content) {
+ if (error) {
+ loadContext.warnings.push('Missing original source at "' + uri + '" - ' + error);
+ }
+
+ whenLoaded(content);
+ });
+}
+
+function loadOriginalSourceFromLocalUri(relativeUri, loadContext) {
+ var isAllowed = isAllowedResource(relativeUri, false, loadContext.inline);
+ var absoluteUri = path.resolve(loadContext.rebaseTo, relativeUri);
+
+ if (!fs.existsSync(absoluteUri) || !fs.statSync(absoluteUri).isFile()) {
+ loadContext.warnings.push('Ignoring local source map at "' + absoluteUri + '" as resource is missing.');
+ return null;
+ } else if (!isAllowed) {
+ loadContext.warnings.push('Cannot fetch "' + absoluteUri + '" as resource is not allowed.');
+ return null;
+ }
+
+ return fs.readFileSync(absoluteUri, 'utf8');
+}
+
+module.exports = loadOriginalSources;
+
+
+/***/ }),
+
+/***/ 9057:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var http = __webpack_require__(8605);
+var https = __webpack_require__(7211);
+var url = __webpack_require__(8835);
+
+var isHttpResource = __webpack_require__(3194);
+var isHttpsResource = __webpack_require__(495);
+var override = __webpack_require__(817);
+
+var HTTP_PROTOCOL = 'http:';
+
+function loadRemoteResource(uri, inlineRequest, inlineTimeout, callback) {
+ var proxyProtocol = inlineRequest.protocol || inlineRequest.hostname;
+ var errorHandled = false;
+ var requestOptions;
+ var fetch;
+
+ requestOptions = override(
+ url.parse(uri),
+ inlineRequest || {}
+ );
+
+ if (inlineRequest.hostname !== undefined) {
+ // overwrite as we always expect a http proxy currently
+ requestOptions.protocol = inlineRequest.protocol || HTTP_PROTOCOL;
+ requestOptions.path = requestOptions.href;
+ }
+
+ fetch = (proxyProtocol && !isHttpsResource(proxyProtocol)) || isHttpResource(uri) ?
+ http.get :
+ https.get;
+
+ fetch(requestOptions, function (res) {
+ var chunks = [];
+ var movedUri;
+
+ if (errorHandled) {
+ return;
+ }
+
+ if (res.statusCode < 200 || res.statusCode > 399) {
+ return callback(res.statusCode, null);
+ } else if (res.statusCode > 299) {
+ movedUri = url.resolve(uri, res.headers.location);
+ return loadRemoteResource(movedUri, inlineRequest, inlineTimeout, callback);
+ }
+
+ res.on('data', function (chunk) {
+ chunks.push(chunk.toString());
+ });
+ res.on('end', function () {
+ var body = chunks.join('');
+ callback(null, body);
+ });
+ })
+ .on('error', function (res) {
+ if (errorHandled) {
+ return;
+ }
+
+ errorHandled = true;
+ callback(res.message, null);
+ })
+ .on('timeout', function () {
+ if (errorHandled) {
+ return;
+ }
+
+ errorHandled = true;
+ callback('timeout', null);
+ })
+ .setTimeout(inlineTimeout);
+}
+
+module.exports = loadRemoteResource;
+
+
+/***/ }),
+
+/***/ 5204:
+/***/ ((module) => {
+
+var DATA_URI_PATTERN = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;
+
+function matchDataUri(uri) {
+ return DATA_URI_PATTERN.exec(uri);
+}
+
+module.exports = matchDataUri;
+
+
+/***/ }),
+
+/***/ 8109:
+/***/ ((module) => {
+
+var UNIX_SEPARATOR = '/';
+var WINDOWS_SEPARATOR_PATTERN = /\\/g;
+
+function normalizePath(path) {
+ return path.replace(WINDOWS_SEPARATOR_PATTERN, UNIX_SEPARATOR);
+}
+
+module.exports = normalizePath;
+
+
+/***/ }),
+
+/***/ 8768:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var fs = __webpack_require__(5747);
+var path = __webpack_require__(5622);
+
+var applySourceMaps = __webpack_require__(6913);
+var extractImportUrlAndMedia = __webpack_require__(8713);
+var isAllowedResource = __webpack_require__(3972);
+var loadOriginalSources = __webpack_require__(3943);
+var normalizePath = __webpack_require__(8109);
+var rebase = __webpack_require__(1374);
+var rebaseLocalMap = __webpack_require__(629);
+var rebaseRemoteMap = __webpack_require__(329);
+var restoreImport = __webpack_require__(7535);
+
+var tokenize = __webpack_require__(2624);
+var Token = __webpack_require__(7298);
+var Marker = __webpack_require__(2638);
+var hasProtocol = __webpack_require__(1865);
+var isImport = __webpack_require__(3223);
+var isRemoteResource = __webpack_require__(793);
+
+var UNKNOWN_URI = 'uri:unknown';
+
+function readSources(input, context, callback) {
+ return doReadSources(input, context, function (tokens) {
+ return applySourceMaps(tokens, context, function () {
+ return loadOriginalSources(context, function () { return callback(tokens); });
+ });
+ });
+}
+
+function doReadSources(input, context, callback) {
+ if (typeof input == 'string') {
+ return fromString(input, context, callback);
+ } else if (Buffer.isBuffer(input)) {
+ return fromString(input.toString(), context, callback);
+ } else if (Array.isArray(input)) {
+ return fromArray(input, context, callback);
+ } else if (typeof input == 'object') {
+ return fromHash(input, context, callback);
+ }
+}
+
+function fromString(input, context, callback) {
+ context.source = undefined;
+ context.sourcesContent[undefined] = input;
+ context.stats.originalSize += input.length;
+
+ return fromStyles(input, context, { inline: context.options.inline }, callback);
+}
+
+function fromArray(input, context, callback) {
+ var inputAsImports = input.reduce(function (accumulator, uriOrHash) {
+ if (typeof uriOrHash === 'string') {
+ return addStringSource(uriOrHash, accumulator);
+ } else {
+ return addHashSource(uriOrHash, context, accumulator);
+ }
+
+ }, []);
+
+ return fromStyles(inputAsImports.join(''), context, { inline: ['all'] }, callback);
+}
+
+function fromHash(input, context, callback) {
+ var inputAsImports = addHashSource(input, context, []);
+ return fromStyles(inputAsImports.join(''), context, { inline: ['all'] }, callback);
+}
+
+function addStringSource(input, imports) {
+ imports.push(restoreAsImport(normalizeUri(input)));
+ return imports;
+}
+
+function addHashSource(input, context, imports) {
+ var uri;
+ var normalizedUri;
+ var source;
+
+ for (uri in input) {
+ source = input[uri];
+ normalizedUri = normalizeUri(uri);
+
+ imports.push(restoreAsImport(normalizedUri));
+
+ context.sourcesContent[normalizedUri] = source.styles;
+
+ if (source.sourceMap) {
+ trackSourceMap(source.sourceMap, normalizedUri, context);
+ }
+ }
+
+ return imports;
+}
+
+function normalizeUri(uri) {
+ var currentPath = path.resolve('');
+ var absoluteUri;
+ var relativeToCurrentPath;
+ var normalizedUri;
+
+ if (isRemoteResource(uri)) {
+ return uri;
+ }
+
+ absoluteUri = path.isAbsolute(uri) ?
+ uri :
+ path.resolve(uri);
+ relativeToCurrentPath = path.relative(currentPath, absoluteUri);
+ normalizedUri = normalizePath(relativeToCurrentPath);
+
+ return normalizedUri;
+}
+
+function trackSourceMap(sourceMap, uri, context) {
+ var parsedMap = typeof sourceMap == 'string' ?
+ JSON.parse(sourceMap) :
+ sourceMap;
+ var rebasedMap = isRemoteResource(uri) ?
+ rebaseRemoteMap(parsedMap, uri) :
+ rebaseLocalMap(parsedMap, uri || UNKNOWN_URI, context.options.rebaseTo);
+
+ context.inputSourceMapTracker.track(uri, rebasedMap);
+}
+
+function restoreAsImport(uri) {
+ return restoreImport('url(' + uri + ')', '') + Marker.SEMICOLON;
+}
+
+function fromStyles(styles, context, parentInlinerContext, callback) {
+ var tokens;
+ var rebaseConfig = {};
+
+ if (!context.source) {
+ rebaseConfig.fromBase = path.resolve('');
+ rebaseConfig.toBase = context.options.rebaseTo;
+ } else if (isRemoteResource(context.source)) {
+ rebaseConfig.fromBase = context.source;
+ rebaseConfig.toBase = context.source;
+ } else if (path.isAbsolute(context.source)) {
+ rebaseConfig.fromBase = path.dirname(context.source);
+ rebaseConfig.toBase = context.options.rebaseTo;
+ } else {
+ rebaseConfig.fromBase = path.dirname(path.resolve(context.source));
+ rebaseConfig.toBase = context.options.rebaseTo;
+ }
+
+ tokens = tokenize(styles, context);
+ tokens = rebase(tokens, context.options.rebase, context.validator, rebaseConfig);
+
+ return allowsAnyImports(parentInlinerContext.inline) ?
+ inline(tokens, context, parentInlinerContext, callback) :
+ callback(tokens);
+}
+
+function allowsAnyImports(inline) {
+ return !(inline.length == 1 && inline[0] == 'none');
+}
+
+function inline(tokens, externalContext, parentInlinerContext, callback) {
+ var inlinerContext = {
+ afterContent: false,
+ callback: callback,
+ errors: externalContext.errors,
+ externalContext: externalContext,
+ fetch: externalContext.options.fetch,
+ inlinedStylesheets: parentInlinerContext.inlinedStylesheets || externalContext.inlinedStylesheets,
+ inline: parentInlinerContext.inline,
+ inlineRequest: externalContext.options.inlineRequest,
+ inlineTimeout: externalContext.options.inlineTimeout,
+ isRemote: parentInlinerContext.isRemote || false,
+ localOnly: externalContext.localOnly,
+ outputTokens: [],
+ rebaseTo: externalContext.options.rebaseTo,
+ sourceTokens: tokens,
+ warnings: externalContext.warnings
+ };
+
+ return doInlineImports(inlinerContext);
+}
+
+function doInlineImports(inlinerContext) {
+ var token;
+ var i, l;
+
+ for (i = 0, l = inlinerContext.sourceTokens.length; i < l; i++) {
+ token = inlinerContext.sourceTokens[i];
+
+ if (token[0] == Token.AT_RULE && isImport(token[1])) {
+ inlinerContext.sourceTokens.splice(0, i);
+ return inlineStylesheet(token, inlinerContext);
+ } else if (token[0] == Token.AT_RULE || token[0] == Token.COMMENT) {
+ inlinerContext.outputTokens.push(token);
+ } else {
+ inlinerContext.outputTokens.push(token);
+ inlinerContext.afterContent = true;
+ }
+ }
+
+ inlinerContext.sourceTokens = [];
+ return inlinerContext.callback(inlinerContext.outputTokens);
+}
+
+function inlineStylesheet(token, inlinerContext) {
+ var uriAndMediaQuery = extractImportUrlAndMedia(token[1]);
+ var uri = uriAndMediaQuery[0];
+ var mediaQuery = uriAndMediaQuery[1];
+ var metadata = token[2];
+
+ return isRemoteResource(uri) ?
+ inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) :
+ inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext);
+}
+
+function inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) {
+ var isAllowed = isAllowedResource(uri, true, inlinerContext.inline);
+ var originalUri = uri;
+ var isLoaded = uri in inlinerContext.externalContext.sourcesContent;
+ var isRuntimeResource = !hasProtocol(uri);
+
+ if (inlinerContext.inlinedStylesheets.indexOf(uri) > -1) {
+ inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as it has already been imported.');
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+ return doInlineImports(inlinerContext);
+ } else if (inlinerContext.localOnly && inlinerContext.afterContent) {
+ inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as no callback given and after other content.');
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+ return doInlineImports(inlinerContext);
+ } else if (isRuntimeResource) {
+ inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as no protocol given.');
+ inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+ return doInlineImports(inlinerContext);
+ } else if (inlinerContext.localOnly && !isLoaded) {
+ inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as no callback given.');
+ inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+ return doInlineImports(inlinerContext);
+ } else if (!isAllowed && inlinerContext.afterContent) {
+ inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as resource is not allowed and after other content.');
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+ return doInlineImports(inlinerContext);
+ } else if (!isAllowed) {
+ inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as resource is not allowed.');
+ inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+ return doInlineImports(inlinerContext);
+ }
+
+ inlinerContext.inlinedStylesheets.push(uri);
+
+ function whenLoaded(error, importedStyles) {
+ if (error) {
+ inlinerContext.errors.push('Broken @import declaration of "' + uri + '" - ' + error);
+
+ return process.nextTick(function () {
+ inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+ doInlineImports(inlinerContext);
+ });
+ }
+
+ inlinerContext.inline = inlinerContext.externalContext.options.inline;
+ inlinerContext.isRemote = true;
+
+ inlinerContext.externalContext.source = originalUri;
+ inlinerContext.externalContext.sourcesContent[uri] = importedStyles;
+ inlinerContext.externalContext.stats.originalSize += importedStyles.length;
+
+ return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function (importedTokens) {
+ importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);
+
+ inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+
+ return doInlineImports(inlinerContext);
+ });
+ }
+
+ return isLoaded ?
+ whenLoaded(null, inlinerContext.externalContext.sourcesContent[uri]) :
+ inlinerContext.fetch(uri, inlinerContext.inlineRequest, inlinerContext.inlineTimeout, whenLoaded);
+}
+
+function inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext) {
+ var currentPath = path.resolve('');
+ var absoluteUri = path.isAbsolute(uri) ?
+ path.resolve(currentPath, uri[0] == '/' ? uri.substring(1) : uri) :
+ path.resolve(inlinerContext.rebaseTo, uri);
+ var relativeToCurrentPath = path.relative(currentPath, absoluteUri);
+ var importedStyles;
+ var isAllowed = isAllowedResource(uri, false, inlinerContext.inline);
+ var normalizedPath = normalizePath(relativeToCurrentPath);
+ var isLoaded = normalizedPath in inlinerContext.externalContext.sourcesContent;
+
+ if (inlinerContext.inlinedStylesheets.indexOf(absoluteUri) > -1) {
+ inlinerContext.warnings.push('Ignoring local @import of "' + uri + '" as it has already been imported.');
+ } else if (!isLoaded && (!fs.existsSync(absoluteUri) || !fs.statSync(absoluteUri).isFile())) {
+ inlinerContext.errors.push('Ignoring local @import of "' + uri + '" as resource is missing.');
+ } else if (!isAllowed && inlinerContext.afterContent) {
+ inlinerContext.warnings.push('Ignoring local @import of "' + uri + '" as resource is not allowed and after other content.');
+ } else if (inlinerContext.afterContent) {
+ inlinerContext.warnings.push('Ignoring local @import of "' + uri + '" as after other content.');
+ } else if (!isAllowed) {
+ inlinerContext.warnings.push('Skipping local @import of "' + uri + '" as resource is not allowed.');
+ inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
+ } else {
+ importedStyles = isLoaded ?
+ inlinerContext.externalContext.sourcesContent[normalizedPath] :
+ fs.readFileSync(absoluteUri, 'utf-8');
+
+ inlinerContext.inlinedStylesheets.push(absoluteUri);
+ inlinerContext.inline = inlinerContext.externalContext.options.inline;
+
+ inlinerContext.externalContext.source = normalizedPath;
+ inlinerContext.externalContext.sourcesContent[normalizedPath] = importedStyles;
+ inlinerContext.externalContext.stats.originalSize += importedStyles.length;
+
+ return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function (importedTokens) {
+ importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);
+
+ inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+
+ return doInlineImports(inlinerContext);
+ });
+ }
+
+ inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
+
+ return doInlineImports(inlinerContext);
+}
+
+function wrapInMedia(tokens, mediaQuery, metadata) {
+ if (mediaQuery) {
+ return [[Token.NESTED_BLOCK, [[Token.NESTED_BLOCK_SCOPE, '@media ' + mediaQuery, metadata]], tokens]];
+ } else {
+ return tokens;
+ }
+}
+
+module.exports = readSources;
+
+
+/***/ }),
+
+/***/ 629:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var path = __webpack_require__(5622);
+
+function rebaseLocalMap(sourceMap, sourceUri, rebaseTo) {
+ var currentPath = path.resolve('');
+ var absoluteUri = path.resolve(currentPath, sourceUri);
+ var absoluteUriDirectory = path.dirname(absoluteUri);
+
+ sourceMap.sources = sourceMap.sources.map(function(source) {
+ return path.relative(rebaseTo, path.resolve(absoluteUriDirectory, source));
+ });
+
+ return sourceMap;
+}
+
+module.exports = rebaseLocalMap;
+
+
+/***/ }),
+
+/***/ 329:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var path = __webpack_require__(5622);
+var url = __webpack_require__(8835);
+
+function rebaseRemoteMap(sourceMap, sourceUri) {
+ var sourceDirectory = path.dirname(sourceUri);
+
+ sourceMap.sources = sourceMap.sources.map(function(source) {
+ return url.resolve(sourceDirectory, source);
+ });
+
+ return sourceMap;
+}
+
+module.exports = rebaseRemoteMap;
+
+
+/***/ }),
+
+/***/ 1374:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var extractImportUrlAndMedia = __webpack_require__(8713);
+var restoreImport = __webpack_require__(7535);
+var rewriteUrl = __webpack_require__(1850);
+
+var Token = __webpack_require__(7298);
+var isImport = __webpack_require__(3223);
+
+var SOURCE_MAP_COMMENT_PATTERN = /^\/\*# sourceMappingURL=(\S+) \*\/$/;
+
+function rebase(tokens, rebaseAll, validator, rebaseConfig) {
+ return rebaseAll ?
+ rebaseEverything(tokens, validator, rebaseConfig) :
+ rebaseAtRules(tokens, validator, rebaseConfig);
+}
+
+function rebaseEverything(tokens, validator, rebaseConfig) {
+ var token;
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ token = tokens[i];
+
+ switch (token[0]) {
+ case Token.AT_RULE:
+ rebaseAtRule(token, validator, rebaseConfig);
+ break;
+ case Token.AT_RULE_BLOCK:
+ rebaseProperties(token[2], validator, rebaseConfig);
+ break;
+ case Token.COMMENT:
+ rebaseSourceMapComment(token, rebaseConfig);
+ break;
+ case Token.NESTED_BLOCK:
+ rebaseEverything(token[2], validator, rebaseConfig);
+ break;
+ case Token.RULE:
+ rebaseProperties(token[2], validator, rebaseConfig);
+ break;
+ }
+ }
+
+ return tokens;
+}
+
+function rebaseAtRules(tokens, validator, rebaseConfig) {
+ var token;
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ token = tokens[i];
+
+ switch (token[0]) {
+ case Token.AT_RULE:
+ rebaseAtRule(token, validator, rebaseConfig);
+ break;
+ }
+ }
+
+ return tokens;
+}
+
+function rebaseAtRule(token, validator, rebaseConfig) {
+ if (!isImport(token[1])) {
+ return;
+ }
+
+ var uriAndMediaQuery = extractImportUrlAndMedia(token[1]);
+ var newUrl = rewriteUrl(uriAndMediaQuery[0], rebaseConfig);
+ var mediaQuery = uriAndMediaQuery[1];
+
+ token[1] = restoreImport(newUrl, mediaQuery);
+}
+
+function rebaseSourceMapComment(token, rebaseConfig) {
+ var matches = SOURCE_MAP_COMMENT_PATTERN.exec(token[1]);
+
+ if (matches && matches[1].indexOf('data:') === -1) {
+ token[1] = token[1].replace(matches[1], rewriteUrl(matches[1], rebaseConfig, true));
+ }
+}
+
+function rebaseProperties(properties, validator, rebaseConfig) {
+ var property;
+ var value;
+ var i, l;
+ var j, m;
+
+ for (i = 0, l = properties.length; i < l; i++) {
+ property = properties[i];
+
+ for (j = 2 /* 0 is Token.PROPERTY, 1 is name */, m = property.length; j < m; j++) {
+ value = property[j][1];
+
+ if (validator.isUrl(value)) {
+ property[j][1] = rewriteUrl(value, rebaseConfig);
+ }
+ }
+ }
+}
+
+module.exports = rebase;
+
+
+/***/ }),
+
+/***/ 7535:
+/***/ ((module) => {
+
+function restoreImport(uri, mediaQuery) {
+ return ('@import ' + uri + ' ' + mediaQuery).trim();
+}
+
+module.exports = restoreImport;
+
+
+/***/ }),
+
+/***/ 1850:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var path = __webpack_require__(5622);
+var url = __webpack_require__(8835);
+
+var isDataUriResource = __webpack_require__(8530);
+
+var DOUBLE_QUOTE = '"';
+var SINGLE_QUOTE = '\'';
+var URL_PREFIX = 'url(';
+var URL_SUFFIX = ')';
+
+var PROTOCOL_LESS_PREFIX_PATTERN = /^[^\w\d]*\/\//;
+var QUOTE_PREFIX_PATTERN = /^["']/;
+var QUOTE_SUFFIX_PATTERN = /["']$/;
+var ROUND_BRACKETS_PATTERN = /[\(\)]/;
+var URL_PREFIX_PATTERN = /^url\(/i;
+var URL_SUFFIX_PATTERN = /\)$/;
+var WHITESPACE_PATTERN = /\s/;
+
+var isWindows = process.platform == 'win32';
+
+function rebase(uri, rebaseConfig) {
+ if (!rebaseConfig) {
+ return uri;
+ }
+
+ if (isAbsolute(uri) && !isRemote(rebaseConfig.toBase)) {
+ return uri;
+ }
+
+ if (isRemote(uri) || isSVGMarker(uri) || isInternal(uri) || isDataUriResource(uri)) {
+ return uri;
+ }
+
+ if (isRemote(rebaseConfig.toBase)) {
+ return url.resolve(rebaseConfig.toBase, uri);
+ }
+
+ return rebaseConfig.absolute ?
+ normalize(absolute(uri, rebaseConfig)) :
+ normalize(relative(uri, rebaseConfig));
+}
+
+function isAbsolute(uri) {
+ return path.isAbsolute(uri);
+}
+
+function isSVGMarker(uri) {
+ return uri[0] == '#';
+}
+
+function isInternal(uri) {
+ return /^\w+:\w+/.test(uri);
+}
+
+function isRemote(uri) {
+ return /^[^:]+?:\/\//.test(uri) || PROTOCOL_LESS_PREFIX_PATTERN.test(uri);
+}
+
+function absolute(uri, rebaseConfig) {
+ return path
+ .resolve(path.join(rebaseConfig.fromBase || '', uri))
+ .replace(rebaseConfig.toBase, '');
+}
+
+function relative(uri, rebaseConfig) {
+ return path.relative(rebaseConfig.toBase, path.join(rebaseConfig.fromBase || '', uri));
+}
+
+function normalize(uri) {
+ return isWindows ? uri.replace(/\\/g, '/') : uri;
+}
+
+function quoteFor(unquotedUrl) {
+ if (unquotedUrl.indexOf(SINGLE_QUOTE) > -1) {
+ return DOUBLE_QUOTE;
+ } else if (unquotedUrl.indexOf(DOUBLE_QUOTE) > -1) {
+ return SINGLE_QUOTE;
+ } else if (hasWhitespace(unquotedUrl) || hasRoundBrackets(unquotedUrl)) {
+ return SINGLE_QUOTE;
+ } else {
+ return '';
+ }
+}
+
+function hasWhitespace(url) {
+ return WHITESPACE_PATTERN.test(url);
+}
+
+function hasRoundBrackets(url) {
+ return ROUND_BRACKETS_PATTERN.test(url);
+}
+
+function rewriteUrl(originalUrl, rebaseConfig, pathOnly) {
+ var strippedUrl = originalUrl
+ .replace(URL_PREFIX_PATTERN, '')
+ .replace(URL_SUFFIX_PATTERN, '')
+ .trim();
+
+ var unquotedUrl = strippedUrl
+ .replace(QUOTE_PREFIX_PATTERN, '')
+ .replace(QUOTE_SUFFIX_PATTERN, '')
+ .trim();
+
+ var quote = strippedUrl[0] == SINGLE_QUOTE || strippedUrl[0] == DOUBLE_QUOTE ?
+ strippedUrl[0] :
+ quoteFor(unquotedUrl);
+
+ return pathOnly ?
+ rebase(unquotedUrl, rebaseConfig) :
+ URL_PREFIX + quote + rebase(unquotedUrl, rebaseConfig) + quote + URL_SUFFIX;
+}
+
+module.exports = rewriteUrl;
+
+
+/***/ }),
+
+/***/ 2638:
+/***/ ((module) => {
+
+var Marker = {
+ ASTERISK: '*',
+ AT: '@',
+ BACK_SLASH: '\\',
+ CARRIAGE_RETURN: '\r',
+ CLOSE_CURLY_BRACKET: '}',
+ CLOSE_ROUND_BRACKET: ')',
+ CLOSE_SQUARE_BRACKET: ']',
+ COLON: ':',
+ COMMA: ',',
+ DOUBLE_QUOTE: '"',
+ EXCLAMATION: '!',
+ FORWARD_SLASH: '/',
+ INTERNAL: '-clean-css-',
+ NEW_LINE_NIX: '\n',
+ OPEN_CURLY_BRACKET: '{',
+ OPEN_ROUND_BRACKET: '(',
+ OPEN_SQUARE_BRACKET: '[',
+ SEMICOLON: ';',
+ SINGLE_QUOTE: '\'',
+ SPACE: ' ',
+ TAB: '\t',
+ UNDERSCORE: '_'
+};
+
+module.exports = Marker;
+
+
+/***/ }),
+
+/***/ 7298:
+/***/ ((module) => {
+
+var Token = {
+ AT_RULE: 'at-rule', // e.g. `@import`, `@charset`
+ AT_RULE_BLOCK: 'at-rule-block', // e.g. `@font-face{...}`
+ AT_RULE_BLOCK_SCOPE: 'at-rule-block-scope', // e.g. `@font-face`
+ COMMENT: 'comment', // e.g. `/* comment */`
+ NESTED_BLOCK: 'nested-block', // e.g. `@media screen{...}`, `@keyframes animation {...}`
+ NESTED_BLOCK_SCOPE: 'nested-block-scope', // e.g. `@media`, `@keyframes`
+ PROPERTY: 'property', // e.g. `color:red`
+ PROPERTY_BLOCK: 'property-block', // e.g. `--var:{color:red}`
+ PROPERTY_NAME: 'property-name', // e.g. `color`
+ PROPERTY_VALUE: 'property-value', // e.g. `red`
+ RAW: 'raw', // e.g. anything between /* clean-css ignore:start */ and /* clean-css ignore:end */ comments
+ RULE: 'rule', // e.g `div > a{...}`
+ RULE_SCOPE: 'rule-scope' // e.g `div > a`
+};
+
+module.exports = Token;
+
+
+/***/ }),
+
+/***/ 2624:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Marker = __webpack_require__(2638);
+var Token = __webpack_require__(7298);
+
+var formatPosition = __webpack_require__(7270);
+
+var Level = {
+ BLOCK: 'block',
+ COMMENT: 'comment',
+ DOUBLE_QUOTE: 'double-quote',
+ RULE: 'rule',
+ SINGLE_QUOTE: 'single-quote'
+};
+
+var AT_RULES = [
+ '@charset',
+ '@import'
+];
+
+var BLOCK_RULES = [
+ '@-moz-document',
+ '@document',
+ '@-moz-keyframes',
+ '@-ms-keyframes',
+ '@-o-keyframes',
+ '@-webkit-keyframes',
+ '@keyframes',
+ '@media',
+ '@supports'
+];
+
+var IGNORE_END_COMMENT_PATTERN = /\/\* clean\-css ignore:end \*\/$/;
+var IGNORE_START_COMMENT_PATTERN = /^\/\* clean\-css ignore:start \*\//;
+
+var PAGE_MARGIN_BOXES = [
+ '@bottom-center',
+ '@bottom-left',
+ '@bottom-left-corner',
+ '@bottom-right',
+ '@bottom-right-corner',
+ '@left-bottom',
+ '@left-middle',
+ '@left-top',
+ '@right-bottom',
+ '@right-middle',
+ '@right-top',
+ '@top-center',
+ '@top-left',
+ '@top-left-corner',
+ '@top-right',
+ '@top-right-corner'
+];
+
+var EXTRA_PAGE_BOXES = [
+ '@footnote',
+ '@footnotes',
+ '@left',
+ '@page-float-bottom',
+ '@page-float-top',
+ '@right'
+];
+
+var REPEAT_PATTERN = /^\[\s{0,31}\d+\s{0,31}\]$/;
+var RULE_WORD_SEPARATOR_PATTERN = /[\s\(]/;
+var TAIL_BROKEN_VALUE_PATTERN = /[\s|\}]*$/;
+
+function tokenize(source, externalContext) {
+ var internalContext = {
+ level: Level.BLOCK,
+ position: {
+ source: externalContext.source || undefined,
+ line: 1,
+ column: 0,
+ index: 0
+ }
+ };
+
+ return intoTokens(source, externalContext, internalContext, false);
+}
+
+function intoTokens(source, externalContext, internalContext, isNested) {
+ var allTokens = [];
+ var newTokens = allTokens;
+ var lastToken;
+ var ruleToken;
+ var ruleTokens = [];
+ var propertyToken;
+ var metadata;
+ var metadatas = [];
+ var level = internalContext.level;
+ var levels = [];
+ var buffer = [];
+ var buffers = [];
+ var isBufferEmpty = true;
+ var serializedBuffer;
+ var serializedBufferPart;
+ var roundBracketLevel = 0;
+ var isQuoted;
+ var isSpace;
+ var isNewLineNix;
+ var isNewLineWin;
+ var isCarriageReturn;
+ var isCommentStart;
+ var wasCommentStart = false;
+ var isCommentEnd;
+ var wasCommentEnd = false;
+ var isCommentEndMarker;
+ var isEscaped;
+ var wasEscaped = false;
+ var characterWithNoSpecialMeaning;
+ var isRaw = false;
+ var seekingValue = false;
+ var seekingPropertyBlockClosing = false;
+ var position = internalContext.position;
+ var lastCommentStartAt;
+
+ for (; position.index < source.length; position.index++) {
+ var character = source[position.index];
+
+ isQuoted = level == Level.SINGLE_QUOTE || level == Level.DOUBLE_QUOTE;
+ isSpace = character == Marker.SPACE || character == Marker.TAB;
+ isNewLineNix = character == Marker.NEW_LINE_NIX;
+ isNewLineWin = character == Marker.NEW_LINE_NIX && source[position.index - 1] == Marker.CARRIAGE_RETURN;
+ isCarriageReturn = character == Marker.CARRIAGE_RETURN && source[position.index + 1] && source[position.index + 1] != Marker.NEW_LINE_NIX;
+ isCommentStart = !wasCommentEnd && level != Level.COMMENT && !isQuoted && character == Marker.ASTERISK && source[position.index - 1] == Marker.FORWARD_SLASH;
+ isCommentEndMarker = !wasCommentStart && !isQuoted && character == Marker.FORWARD_SLASH && source[position.index - 1] == Marker.ASTERISK;
+ isCommentEnd = level == Level.COMMENT && isCommentEndMarker;
+ characterWithNoSpecialMeaning = !isSpace && !isCarriageReturn && (character >= 'A' && character <= 'Z' || character >= 'a' && character <= 'z' || character >= '0' && character <= '9' || character == '-');
+ roundBracketLevel = Math.max(roundBracketLevel, 0);
+
+ metadata = isBufferEmpty ?
+ [position.line, position.column, position.source] :
+ metadata;
+
+ if (isEscaped) {
+ // previous character was a backslash
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (characterWithNoSpecialMeaning) {
+ // it's just an alphanumeric character or a hyphen (part of any rule or property name) so let's end it quickly
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if ((isSpace || isNewLineNix && !isNewLineWin) && (isQuoted || level == Level.COMMENT)) {
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if ((isSpace || isNewLineNix && !isNewLineWin) && isBufferEmpty) {
+ // noop
+ } else if (!isCommentEnd && level == Level.COMMENT) {
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (!isCommentStart && !isCommentEnd && isRaw) {
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (isCommentStart && (level == Level.BLOCK || level == Level.RULE) && buffer.length > 1) {
+ // comment start within block preceded by some content, e.g. div/*<--
+ metadatas.push(metadata);
+ buffer.push(character);
+ buffers.push(buffer.slice(0, -2));
+ isBufferEmpty = false;
+
+ buffer = buffer.slice(-2);
+ metadata = [position.line, position.column - 1, position.source];
+
+ levels.push(level);
+ level = Level.COMMENT;
+ } else if (isCommentStart) {
+ // comment start, e.g. /*<--
+ levels.push(level);
+ level = Level.COMMENT;
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (isCommentEnd && isIgnoreStartComment(buffer)) {
+ // ignore:start comment end, e.g. /* clean-css ignore:start */<--
+ serializedBuffer = buffer.join('').trim() + character;
+ lastToken = [Token.COMMENT, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]];
+ newTokens.push(lastToken);
+
+ isRaw = true;
+ metadata = metadatas.pop() || null;
+ buffer = buffers.pop() || [];
+ isBufferEmpty = buffer.length === 0;
+ } else if (isCommentEnd && isIgnoreEndComment(buffer)) {
+ // ignore:start comment end, e.g. /* clean-css ignore:end */<--
+ serializedBuffer = buffer.join('') + character;
+ lastCommentStartAt = serializedBuffer.lastIndexOf(Marker.FORWARD_SLASH + Marker.ASTERISK);
+
+ serializedBufferPart = serializedBuffer.substring(0, lastCommentStartAt);
+ lastToken = [Token.RAW, serializedBufferPart, [originalMetadata(metadata, serializedBufferPart, externalContext)]];
+ newTokens.push(lastToken);
+
+ serializedBufferPart = serializedBuffer.substring(lastCommentStartAt);
+ metadata = [position.line, position.column - serializedBufferPart.length + 1, position.source];
+ lastToken = [Token.COMMENT, serializedBufferPart, [originalMetadata(metadata, serializedBufferPart, externalContext)]];
+ newTokens.push(lastToken);
+
+ isRaw = false;
+ level = levels.pop();
+ metadata = metadatas.pop() || null;
+ buffer = buffers.pop() || [];
+ isBufferEmpty = buffer.length === 0;
+ } else if (isCommentEnd) {
+ // comment end, e.g. /* comment */<--
+ serializedBuffer = buffer.join('').trim() + character;
+ lastToken = [Token.COMMENT, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]];
+ newTokens.push(lastToken);
+
+ level = levels.pop();
+ metadata = metadatas.pop() || null;
+ buffer = buffers.pop() || [];
+ isBufferEmpty = buffer.length === 0;
+ } else if (isCommentEndMarker && source[position.index + 1] != Marker.ASTERISK) {
+ externalContext.warnings.push('Unexpected \'*/\' at ' + formatPosition([position.line, position.column, position.source]) + '.');
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {
+ // single quotation start, e.g. a[href^='https<--
+ levels.push(level);
+ level = Level.SINGLE_QUOTE;
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (character == Marker.SINGLE_QUOTE && level == Level.SINGLE_QUOTE) {
+ // single quotation end, e.g. a[href^='https'<--
+ level = levels.pop();
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {
+ // double quotation start, e.g. a[href^="<--
+ levels.push(level);
+ level = Level.DOUBLE_QUOTE;
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (character == Marker.DOUBLE_QUOTE && level == Level.DOUBLE_QUOTE) {
+ // double quotation end, e.g. a[href^="https"<--
+ level = levels.pop();
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (!isCommentStart && !isCommentEnd && character != Marker.CLOSE_ROUND_BRACKET && character != Marker.OPEN_ROUND_BRACKET && level != Level.COMMENT && !isQuoted && roundBracketLevel > 0) {
+ // character inside any function, e.g. hsla(.<--
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted && level != Level.COMMENT && !seekingValue) {
+ // round open bracket, e.g. @import url(<--
+ buffer.push(character);
+ isBufferEmpty = false;
+
+ roundBracketLevel++;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted && level != Level.COMMENT && !seekingValue) {
+ // round open bracket, e.g. @import url(test.css)<--
+ buffer.push(character);
+ isBufferEmpty = false;
+
+ roundBracketLevel--;
+ } else if (character == Marker.SEMICOLON && level == Level.BLOCK && buffer[0] == Marker.AT) {
+ // semicolon ending rule at block level, e.g. @import '...';<--
+ serializedBuffer = buffer.join('').trim();
+ allTokens.push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.COMMA && level == Level.BLOCK && ruleToken) {
+ // comma separator at block level, e.g. a,div,<--
+ serializedBuffer = buffer.join('').trim();
+ ruleToken[1].push([tokenScopeFrom(ruleToken[0]), serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext, ruleToken[1].length)]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.COMMA && level == Level.BLOCK && tokenTypeFrom(buffer) == Token.AT_RULE) {
+ // comma separator at block level, e.g. @import url(...) screen,<--
+ // keep iterating as end semicolon will create the token
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (character == Marker.COMMA && level == Level.BLOCK) {
+ // comma separator at block level, e.g. a,<--
+ ruleToken = [tokenTypeFrom(buffer), [], []];
+ serializedBuffer = buffer.join('').trim();
+ ruleToken[1].push([tokenScopeFrom(ruleToken[0]), serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext, 0)]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK && ruleToken && ruleToken[0] == Token.NESTED_BLOCK) {
+ // open brace opening at-rule at block level, e.g. @media{<--
+ serializedBuffer = buffer.join('').trim();
+ ruleToken[1].push([Token.NESTED_BLOCK_SCOPE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ allTokens.push(ruleToken);
+
+ levels.push(level);
+ position.column++;
+ position.index++;
+ buffer = [];
+ isBufferEmpty = true;
+
+ ruleToken[2] = intoTokens(source, externalContext, internalContext, true);
+ ruleToken = null;
+ } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK && tokenTypeFrom(buffer) == Token.NESTED_BLOCK) {
+ // open brace opening at-rule at block level, e.g. @media{<--
+ serializedBuffer = buffer.join('').trim();
+ ruleToken = ruleToken || [Token.NESTED_BLOCK, [], []];
+ ruleToken[1].push([Token.NESTED_BLOCK_SCOPE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ allTokens.push(ruleToken);
+
+ levels.push(level);
+ position.column++;
+ position.index++;
+ buffer = [];
+ isBufferEmpty = true;
+
+ ruleToken[2] = intoTokens(source, externalContext, internalContext, true);
+ ruleToken = null;
+ } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.BLOCK) {
+ // open brace opening rule at block level, e.g. div{<--
+ serializedBuffer = buffer.join('').trim();
+ ruleToken = ruleToken || [tokenTypeFrom(buffer), [], []];
+ ruleToken[1].push([tokenScopeFrom(ruleToken[0]), serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext, ruleToken[1].length)]]);
+ newTokens = ruleToken[2];
+ allTokens.push(ruleToken);
+
+ levels.push(level);
+ level = Level.RULE;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.RULE && seekingValue) {
+ // open brace opening rule at rule level, e.g. div{--variable:{<--
+ ruleTokens.push(ruleToken);
+ ruleToken = [Token.PROPERTY_BLOCK, []];
+ propertyToken.push(ruleToken);
+ newTokens = ruleToken[1];
+
+ levels.push(level);
+ level = Level.RULE;
+ seekingValue = false;
+ } else if (character == Marker.OPEN_CURLY_BRACKET && level == Level.RULE && isPageMarginBox(buffer)) {
+ // open brace opening page-margin box at rule level, e.g. @page{@top-center{<--
+ serializedBuffer = buffer.join('').trim();
+ ruleTokens.push(ruleToken);
+ ruleToken = [Token.AT_RULE_BLOCK, [], []];
+ ruleToken[1].push([Token.AT_RULE_BLOCK_SCOPE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ newTokens.push(ruleToken);
+ newTokens = ruleToken[2];
+
+ levels.push(level);
+ level = Level.RULE;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.COLON && level == Level.RULE && !seekingValue) {
+ // colon at rule level, e.g. a{color:<--
+ serializedBuffer = buffer.join('').trim();
+ propertyToken = [Token.PROPERTY, [Token.PROPERTY_NAME, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]];
+ newTokens.push(propertyToken);
+
+ seekingValue = true;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && ruleTokens.length > 0 && !isBufferEmpty && buffer[0] == Marker.AT) {
+ // semicolon at rule level for at-rule, e.g. a{--color:{@apply(--other-color);<--
+ serializedBuffer = buffer.join('').trim();
+ ruleToken[1].push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && !isBufferEmpty) {
+ // semicolon at rule level, e.g. a{color:red;<--
+ serializedBuffer = buffer.join('').trim();
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ propertyToken = null;
+ seekingValue = false;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.SEMICOLON && level == Level.RULE && propertyToken && isBufferEmpty) {
+ // semicolon after bracketed value at rule level, e.g. a{color:rgb(...);<--
+ propertyToken = null;
+ seekingValue = false;
+ } else if (character == Marker.SEMICOLON && level == Level.RULE && !isBufferEmpty && buffer[0] == Marker.AT) {
+ // semicolon for at-rule at rule level, e.g. a{@apply(--variable);<--
+ serializedBuffer = buffer.join('');
+ newTokens.push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ seekingValue = false;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.SEMICOLON && level == Level.RULE && seekingPropertyBlockClosing) {
+ // close brace after a property block at rule level, e.g. a{--custom:{color:red;};<--
+ seekingPropertyBlockClosing = false;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.SEMICOLON && level == Level.RULE && isBufferEmpty) {
+ // stray semicolon at rule level, e.g. a{;<--
+ // noop
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && seekingValue && !isBufferEmpty && ruleTokens.length > 0) {
+ // close brace at rule level, e.g. a{--color:{color:red}<--
+ serializedBuffer = buffer.join('');
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ propertyToken = null;
+ ruleToken = ruleTokens.pop();
+ newTokens = ruleToken[2];
+
+ level = levels.pop();
+ seekingValue = false;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && !isBufferEmpty && buffer[0] == Marker.AT && ruleTokens.length > 0) {
+ // close brace at rule level for at-rule, e.g. a{--color:{@apply(--other-color)}<--
+ serializedBuffer = buffer.join('');
+ ruleToken[1].push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ propertyToken = null;
+ ruleToken = ruleTokens.pop();
+ newTokens = ruleToken[2];
+
+ level = levels.pop();
+ seekingValue = false;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && ruleTokens.length > 0) {
+ // close brace at rule level after space, e.g. a{--color:{color:red }<--
+ propertyToken = null;
+ ruleToken = ruleTokens.pop();
+ newTokens = ruleToken[2];
+
+ level = levels.pop();
+ seekingValue = false;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && propertyToken && !isBufferEmpty) {
+ // close brace at rule level, e.g. a{color:red}<--
+ serializedBuffer = buffer.join('');
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ propertyToken = null;
+ ruleToken = ruleTokens.pop();
+ newTokens = allTokens;
+
+ level = levels.pop();
+ seekingValue = false;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && !isBufferEmpty && buffer[0] == Marker.AT) {
+ // close brace after at-rule at rule level, e.g. a{@apply(--variable)}<--
+ propertyToken = null;
+ ruleToken = null;
+ serializedBuffer = buffer.join('').trim();
+ newTokens.push([Token.AT_RULE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ newTokens = allTokens;
+
+ level = levels.pop();
+ seekingValue = false;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE && levels[levels.length - 1] == Level.RULE) {
+ // close brace after a property block at rule level, e.g. a{--custom:{color:red;}<--
+ propertyToken = null;
+ ruleToken = ruleTokens.pop();
+ newTokens = ruleToken[2];
+
+ level = levels.pop();
+ seekingValue = false;
+ seekingPropertyBlockClosing = true;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.RULE) {
+ // close brace after a rule, e.g. a{color:red;}<--
+ propertyToken = null;
+ ruleToken = null;
+ newTokens = allTokens;
+
+ level = levels.pop();
+ seekingValue = false;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.BLOCK && !isNested && position.index <= source.length - 1) {
+ // stray close brace at block level, e.g. a{color:red}color:blue}<--
+ externalContext.warnings.push('Unexpected \'}\' at ' + formatPosition([position.line, position.column, position.source]) + '.');
+ buffer.push(character);
+ isBufferEmpty = false;
+ } else if (character == Marker.CLOSE_CURLY_BRACKET && level == Level.BLOCK) {
+ // close brace at block level, e.g. @media screen {...}<--
+ break;
+ } else if (character == Marker.OPEN_ROUND_BRACKET && level == Level.RULE && seekingValue) {
+ // round open bracket, e.g. a{color:hsla(<--
+ buffer.push(character);
+ isBufferEmpty = false;
+ roundBracketLevel++;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET && level == Level.RULE && seekingValue && roundBracketLevel == 1) {
+ // round close bracket, e.g. a{color:hsla(0,0%,0%)<--
+ buffer.push(character);
+ isBufferEmpty = false;
+ serializedBuffer = buffer.join('').trim();
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ roundBracketLevel--;
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.CLOSE_ROUND_BRACKET && level == Level.RULE && seekingValue) {
+ // round close bracket within other brackets, e.g. a{width:calc((10rem / 2)<--
+ buffer.push(character);
+ isBufferEmpty = false;
+ roundBracketLevel--;
+ } else if (character == Marker.FORWARD_SLASH && source[position.index + 1] != Marker.ASTERISK && level == Level.RULE && seekingValue && !isBufferEmpty) {
+ // forward slash within a property, e.g. a{background:url(image.png) 0 0/<--
+ serializedBuffer = buffer.join('').trim();
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.FORWARD_SLASH && source[position.index + 1] != Marker.ASTERISK && level == Level.RULE && seekingValue) {
+ // forward slash within a property after space, e.g. a{background:url(image.png) 0 0 /<--
+ propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.COMMA && level == Level.RULE && seekingValue && !isBufferEmpty) {
+ // comma within a property, e.g. a{background:url(image.png),<--
+ serializedBuffer = buffer.join('').trim();
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+ propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.COMMA && level == Level.RULE && seekingValue) {
+ // comma within a property after space, e.g. a{background:url(image.png) ,<--
+ propertyToken.push([Token.PROPERTY_VALUE, character, [[position.line, position.column, position.source]]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (character == Marker.CLOSE_SQUARE_BRACKET && propertyToken && propertyToken.length > 1 && !isBufferEmpty && isRepeatToken(buffer)) {
+ buffer.push(character);
+ serializedBuffer = buffer.join('').trim();
+ propertyToken[propertyToken.length - 1][1] += serializedBuffer;
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if ((isSpace || (isNewLineNix && !isNewLineWin)) && level == Level.RULE && seekingValue && propertyToken && !isBufferEmpty) {
+ // space or *nix newline within property, e.g. a{margin:0 <--
+ serializedBuffer = buffer.join('').trim();
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (isNewLineWin && level == Level.RULE && seekingValue && propertyToken && buffer.length > 1) {
+ // win newline within property, e.g. a{margin:0\r\n<--
+ serializedBuffer = buffer.join('').trim();
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (isNewLineWin && level == Level.RULE && seekingValue) {
+ // win newline
+ buffer = [];
+ isBufferEmpty = true;
+ } else if (isNewLineWin && buffer.length == 1) {
+ // ignore windows newline which is composed of two characters
+ buffer.pop();
+ isBufferEmpty = buffer.length === 0;
+ } else if (!isBufferEmpty || !isSpace && !isNewLineNix && !isNewLineWin && !isCarriageReturn) {
+ // any character
+ buffer.push(character);
+ isBufferEmpty = false;
+ }
+
+ wasEscaped = isEscaped;
+ isEscaped = !wasEscaped && character == Marker.BACK_SLASH;
+ wasCommentStart = isCommentStart;
+ wasCommentEnd = isCommentEnd;
+
+ position.line = (isNewLineWin || isNewLineNix || isCarriageReturn) ? position.line + 1 : position.line;
+ position.column = (isNewLineWin || isNewLineNix || isCarriageReturn) ? 0 : position.column + 1;
+ }
+
+ if (seekingValue) {
+ externalContext.warnings.push('Missing \'}\' at ' + formatPosition([position.line, position.column, position.source]) + '.');
+ }
+
+ if (seekingValue && buffer.length > 0) {
+ serializedBuffer = buffer.join('').replace(TAIL_BROKEN_VALUE_PATTERN, '');
+ propertyToken.push([Token.PROPERTY_VALUE, serializedBuffer, [originalMetadata(metadata, serializedBuffer, externalContext)]]);
+
+ buffer = [];
+ }
+
+ if (buffer.length > 0) {
+ externalContext.warnings.push('Invalid character(s) \'' + buffer.join('') + '\' at ' + formatPosition(metadata) + '. Ignoring.');
+ }
+
+ return allTokens;
+}
+
+function isIgnoreStartComment(buffer) {
+ return IGNORE_START_COMMENT_PATTERN.test(buffer.join('') + Marker.FORWARD_SLASH);
+}
+
+function isIgnoreEndComment(buffer) {
+ return IGNORE_END_COMMENT_PATTERN.test(buffer.join('') + Marker.FORWARD_SLASH);
+}
+
+function originalMetadata(metadata, value, externalContext, selectorFallbacks) {
+ var source = metadata[2];
+
+ return externalContext.inputSourceMapTracker.isTracking(source) ?
+ externalContext.inputSourceMapTracker.originalPositionFor(metadata, value.length, selectorFallbacks) :
+ metadata;
+}
+
+function tokenTypeFrom(buffer) {
+ var isAtRule = buffer[0] == Marker.AT || buffer[0] == Marker.UNDERSCORE;
+ var ruleWord = buffer.join('').split(RULE_WORD_SEPARATOR_PATTERN)[0];
+
+ if (isAtRule && BLOCK_RULES.indexOf(ruleWord) > -1) {
+ return Token.NESTED_BLOCK;
+ } else if (isAtRule && AT_RULES.indexOf(ruleWord) > -1) {
+ return Token.AT_RULE;
+ } else if (isAtRule) {
+ return Token.AT_RULE_BLOCK;
+ } else {
+ return Token.RULE;
+ }
+}
+
+function tokenScopeFrom(tokenType) {
+ if (tokenType == Token.RULE) {
+ return Token.RULE_SCOPE;
+ } else if (tokenType == Token.NESTED_BLOCK) {
+ return Token.NESTED_BLOCK_SCOPE;
+ } else if (tokenType == Token.AT_RULE_BLOCK) {
+ return Token.AT_RULE_BLOCK_SCOPE;
+ }
+}
+
+function isPageMarginBox(buffer) {
+ var serializedBuffer = buffer.join('').trim();
+
+ return PAGE_MARGIN_BOXES.indexOf(serializedBuffer) > -1 || EXTRA_PAGE_BOXES.indexOf(serializedBuffer) > -1;
+}
+
+function isRepeatToken(buffer) {
+ return REPEAT_PATTERN.test(buffer.join('') + Marker.CLOSE_SQUARE_BRACKET);
+}
+
+module.exports = tokenize;
+
+
+/***/ }),
+
+/***/ 1475:
+/***/ ((module) => {
+
+function cloneArray(array) {
+ var cloned = array.slice(0);
+
+ for (var i = 0, l = cloned.length; i < l; i++) {
+ if (Array.isArray(cloned[i]))
+ cloned[i] = cloneArray(cloned[i]);
+ }
+
+ return cloned;
+}
+
+module.exports = cloneArray;
+
+
+/***/ }),
+
+/***/ 7270:
+/***/ ((module) => {
+
+function formatPosition(metadata) {
+ var line = metadata[0];
+ var column = metadata[1];
+ var source = metadata[2];
+
+ return source ?
+ source + ':' + line + ':' + column :
+ line + ':' + column;
+}
+
+module.exports = formatPosition;
+
+
+/***/ }),
+
+/***/ 1865:
+/***/ ((module) => {
+
+var NO_PROTOCOL_RESOURCE_PATTERN = /^\/\//;
+
+function hasProtocol(uri) {
+ return !NO_PROTOCOL_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = hasProtocol;
+
+
+/***/ }),
+
+/***/ 8530:
+/***/ ((module) => {
+
+var DATA_URI_PATTERN = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;
+
+function isDataUriResource(uri) {
+ return DATA_URI_PATTERN.test(uri);
+}
+
+module.exports = isDataUriResource;
+
+
+/***/ }),
+
+/***/ 3194:
+/***/ ((module) => {
+
+var HTTP_RESOURCE_PATTERN = /^http:\/\//;
+
+function isHttpResource(uri) {
+ return HTTP_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = isHttpResource;
+
+
+/***/ }),
+
+/***/ 495:
+/***/ ((module) => {
+
+var HTTPS_RESOURCE_PATTERN = /^https:\/\//;
+
+function isHttpsResource(uri) {
+ return HTTPS_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = isHttpsResource;
+
+
+/***/ }),
+
+/***/ 3223:
+/***/ ((module) => {
+
+var IMPORT_PREFIX_PATTERN = /^@import/i;
+
+function isImport(value) {
+ return IMPORT_PREFIX_PATTERN.test(value);
+}
+
+module.exports = isImport;
+
+
+/***/ }),
+
+/***/ 793:
+/***/ ((module) => {
+
+var REMOTE_RESOURCE_PATTERN = /^(\w+:\/\/|\/\/)/;
+
+function isRemoteResource(uri) {
+ return REMOTE_RESOURCE_PATTERN.test(uri);
+}
+
+module.exports = isRemoteResource;
+
+
+/***/ }),
+
+/***/ 9062:
+/***/ ((module) => {
+
+// adapted from http://nedbatchelder.com/blog/200712.html#e20071211T054956
+
+var NUMBER_PATTERN = /([0-9]+)/;
+
+function naturalCompare(value1, value2) {
+ var keys1 = ('' + value1).split(NUMBER_PATTERN).map(tryParseInt);
+ var keys2 = ('' + value2).split(NUMBER_PATTERN).map(tryParseInt);
+ var key1;
+ var key2;
+ var compareFirst = Math.min(keys1.length, keys2.length);
+ var i, l;
+
+ for (i = 0, l = compareFirst; i < l; i++) {
+ key1 = keys1[i];
+ key2 = keys2[i];
+
+ if (key1 != key2) {
+ return key1 > key2 ? 1 : -1;
+ }
+ }
+
+ return keys1.length > keys2.length ? 1 : (keys1.length == keys2.length ? 0 : -1);
+}
+
+function tryParseInt(value) {
+ return ('' + parseInt(value)) == value ?
+ parseInt(value) :
+ value;
+}
+
+module.exports = naturalCompare;
+
+
+/***/ }),
+
+/***/ 817:
+/***/ ((module) => {
+
+function override(source1, source2) {
+ var target = {};
+ var key1;
+ var key2;
+ var item;
+
+ for (key1 in source1) {
+ item = source1[key1];
+
+ if (Array.isArray(item)) {
+ target[key1] = item.slice(0);
+ } else if (typeof item == 'object' && item !== null) {
+ target[key1] = override(item, {});
+ } else {
+ target[key1] = item;
+ }
+ }
+
+ for (key2 in source2) {
+ item = source2[key2];
+
+ if (key2 in target && Array.isArray(item)) {
+ target[key2] = item.slice(0);
+ } else if (key2 in target && typeof item == 'object' && item !== null) {
+ target[key2] = override(target[key2], item);
+ } else {
+ target[key2] = item;
+ }
+ }
+
+ return target;
+}
+
+module.exports = override;
+
+
+/***/ }),
+
+/***/ 8794:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Marker = __webpack_require__(2638);
+
+function is(value, separator, isSeparatorRegex) {
+ return isSeparatorRegex ?
+ separator.test(value) :
+ value === separator;
+}
+
+function split(value, separator) {
+ var openLevel = Marker.OPEN_ROUND_BRACKET;
+ var closeLevel = Marker.CLOSE_ROUND_BRACKET;
+ var level = 0;
+ var cursor = 0;
+ var lastStart = 0;
+ var lastValue;
+ var lastCharacter;
+ var len = value.length;
+ var parts = [];
+ var isSeparatorRegex = typeof(separator) == 'object' && 'exec' in separator;
+
+ if (!isSeparatorRegex && value.indexOf(separator) == -1) {
+ return [value];
+ }
+
+ if (value.indexOf(openLevel) == -1) {
+ return value.split(separator);
+ }
+
+ while (cursor < len) {
+ if (value[cursor] == openLevel) {
+ level++;
+ } else if (value[cursor] == closeLevel) {
+ level--;
+ }
+
+ if (level === 0 && cursor > 0 && cursor + 1 < len && is(value[cursor], separator, isSeparatorRegex)) {
+ parts.push(value.substring(lastStart, cursor));
+
+ if (isSeparatorRegex && separator.exec(value[cursor]).length > 1) {
+ parts.push(value[cursor]);
+ }
+
+ lastStart = cursor + 1;
+ }
+
+ cursor++;
+ }
+
+ if (lastStart < cursor + 1) {
+ lastValue = value.substring(lastStart);
+ lastCharacter = lastValue[lastValue.length - 1];
+ if (is(lastCharacter, separator, isSeparatorRegex)) {
+ lastValue = lastValue.substring(0, lastValue.length - 1);
+ }
+
+ parts.push(lastValue);
+ }
+
+ return parts;
+}
+
+module.exports = split;
+
+
+/***/ }),
+
+/***/ 4502:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var emptyCharacter = '';
+
+var Breaks = __webpack_require__(3320).Breaks;
+var Spaces = __webpack_require__(3320).Spaces;
+
+var Marker = __webpack_require__(2638);
+var Token = __webpack_require__(7298);
+
+function supportsAfterClosingBrace(token) {
+ return token[1][1] == 'background' || token[1][1] == 'transform' || token[1][1] == 'src';
+}
+
+function afterClosingBrace(token, valueIndex) {
+ return token[valueIndex][1][token[valueIndex][1].length - 1] == Marker.CLOSE_ROUND_BRACKET;
+}
+
+function afterComma(token, valueIndex) {
+ return token[valueIndex][1] == Marker.COMMA;
+}
+
+function afterSlash(token, valueIndex) {
+ return token[valueIndex][1] == Marker.FORWARD_SLASH;
+}
+
+function beforeComma(token, valueIndex) {
+ return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.COMMA;
+}
+
+function beforeSlash(token, valueIndex) {
+ return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.FORWARD_SLASH;
+}
+
+function inFilter(token) {
+ return token[1][1] == 'filter' || token[1][1] == '-ms-filter';
+}
+
+function disallowsSpace(context, token, valueIndex) {
+ return !context.spaceAfterClosingBrace && supportsAfterClosingBrace(token) && afterClosingBrace(token, valueIndex) ||
+ beforeSlash(token, valueIndex) ||
+ afterSlash(token, valueIndex) ||
+ beforeComma(token, valueIndex) ||
+ afterComma(token, valueIndex);
+}
+
+function rules(context, tokens) {
+ var store = context.store;
+
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ store(context, tokens[i]);
+
+ if (i < l - 1) {
+ store(context, comma(context));
+ }
+ }
+}
+
+function body(context, tokens) {
+ var lastPropertyAt = lastPropertyIndex(tokens);
+
+ for (var i = 0, l = tokens.length; i < l; i++) {
+ property(context, tokens, i, lastPropertyAt);
+ }
+}
+
+function lastPropertyIndex(tokens) {
+ var index = tokens.length - 1;
+
+ for (; index >= 0; index--) {
+ if (tokens[index][0] != Token.COMMENT) {
+ break;
+ }
+ }
+
+ return index;
+}
+
+function property(context, tokens, position, lastPropertyAt) {
+ var store = context.store;
+ var token = tokens[position];
+
+ var propertyValue = token[2];
+ var isPropertyBlock = propertyValue && propertyValue[0] === Token.PROPERTY_BLOCK;
+
+ var needsSemicolon;
+ if ( context.format ) {
+ if ( context.format.semicolonAfterLastProperty || isPropertyBlock ) {
+ needsSemicolon = true;
+ } else if ( position < lastPropertyAt ) {
+ needsSemicolon = true;
+ } else {
+ needsSemicolon = false;
+ }
+ } else {
+ needsSemicolon = position < lastPropertyAt || isPropertyBlock;
+ }
+
+ var isLast = position === lastPropertyAt;
+
+ switch (token[0]) {
+ case Token.AT_RULE:
+ store(context, token);
+ store(context, semicolon(context, Breaks.AfterProperty, false));
+ break;
+ case Token.AT_RULE_BLOCK:
+ rules(context, token[1]);
+ store(context, openBrace(context, Breaks.AfterRuleBegins, true));
+ body(context, token[2]);
+ store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));
+ break;
+ case Token.COMMENT:
+ store(context, token);
+ store(context, breakFor(context, Breaks.AfterComment) + context.indentWith);
+ break;
+ case Token.PROPERTY:
+ store(context, token[1]);
+ store(context, colon(context));
+ if (propertyValue) {
+ value(context, token);
+ }
+ store(context, needsSemicolon ? semicolon(context, Breaks.AfterProperty, isLast) : emptyCharacter);
+ break;
+ case Token.RAW:
+ store(context, token);
+ }
+}
+
+function value(context, token) {
+ var store = context.store;
+ var j, m;
+
+ if (token[2][0] == Token.PROPERTY_BLOCK) {
+ store(context, openBrace(context, Breaks.AfterBlockBegins, false));
+ body(context, token[2][1]);
+ store(context, closeBrace(context, Breaks.AfterBlockEnds, false, true));
+ } else {
+ for (j = 2, m = token.length; j < m; j++) {
+ store(context, token[j]);
+
+ if (j < m - 1 && (inFilter(token) || !disallowsSpace(context, token, j))) {
+ store(context, Marker.SPACE);
+ }
+ }
+ }
+}
+
+function breakFor(context, where) {
+ return context.format ? context.format.breaks[where] : emptyCharacter;
+}
+
+function allowsSpace(context, where) {
+ return context.format && context.format.spaces[where];
+}
+
+function openBrace(context, where, needsPrefixSpace) {
+ if (context.format) {
+ context.indentBy += context.format.indentBy;
+ context.indentWith = context.format.indentWith.repeat(context.indentBy);
+ return (needsPrefixSpace && allowsSpace(context, Spaces.BeforeBlockBegins) ? Marker.SPACE : emptyCharacter) +
+ Marker.OPEN_CURLY_BRACKET +
+ breakFor(context, where) +
+ context.indentWith;
+ } else {
+ return Marker.OPEN_CURLY_BRACKET;
+ }
+}
+
+function closeBrace(context, where, beforeBlockEnd, isLast) {
+ if (context.format) {
+ context.indentBy -= context.format.indentBy;
+ context.indentWith = context.format.indentWith.repeat(context.indentBy);
+ return (beforeBlockEnd ? breakFor(context, Breaks.BeforeBlockEnds) : breakFor(context, Breaks.AfterProperty)) +
+ context.indentWith +
+ Marker.CLOSE_CURLY_BRACKET +
+ (isLast ? emptyCharacter : breakFor(context, where) + context.indentWith);
+ } else {
+ return Marker.CLOSE_CURLY_BRACKET;
+ }
+}
+
+function colon(context) {
+ return context.format ?
+ Marker.COLON + (allowsSpace(context, Spaces.BeforeValue) ? Marker.SPACE : emptyCharacter) :
+ Marker.COLON;
+}
+
+function semicolon(context, where, isLast) {
+ return context.format ?
+ Marker.SEMICOLON + (isLast ? emptyCharacter : (breakFor(context, where) + context.indentWith)) :
+ Marker.SEMICOLON;
+}
+
+function comma(context) {
+ return context.format ?
+ Marker.COMMA + breakFor(context, Breaks.BetweenSelectors) + context.indentWith :
+ Marker.COMMA;
+}
+
+function all(context, tokens) {
+ var store = context.store;
+ var token;
+ var isLast;
+ var i, l;
+
+ for (i = 0, l = tokens.length; i < l; i++) {
+ token = tokens[i];
+ isLast = i == l - 1;
+
+ switch (token[0]) {
+ case Token.AT_RULE:
+ store(context, token);
+ store(context, semicolon(context, Breaks.AfterAtRule, isLast));
+ break;
+ case Token.AT_RULE_BLOCK:
+ rules(context, token[1]);
+ store(context, openBrace(context, Breaks.AfterRuleBegins, true));
+ body(context, token[2]);
+ store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));
+ break;
+ case Token.NESTED_BLOCK:
+ rules(context, token[1]);
+ store(context, openBrace(context, Breaks.AfterBlockBegins, true));
+ all(context, token[2]);
+ store(context, closeBrace(context, Breaks.AfterBlockEnds, true, isLast));
+ break;
+ case Token.COMMENT:
+ store(context, token);
+ store(context, breakFor(context, Breaks.AfterComment) + context.indentWith);
+ break;
+ case Token.RAW:
+ store(context, token);
+ break;
+ case Token.RULE:
+ rules(context, token[1]);
+ store(context, openBrace(context, Breaks.AfterRuleBegins, true));
+ body(context, token[2]);
+ store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));
+ break;
+ }
+ }
+}
+
+module.exports = {
+ all: all,
+ body: body,
+ property: property,
+ rules: rules,
+ value: value
+};
+
+
+/***/ }),
+
+/***/ 5327:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var helpers = __webpack_require__(4502);
+
+function store(serializeContext, token) {
+ serializeContext.output.push(typeof token == 'string' ? token : token[1]);
+}
+
+function context() {
+ var newContext = {
+ output: [],
+ store: store
+ };
+
+ return newContext;
+}
+
+function all(tokens) {
+ var oneTimeContext = context();
+ helpers.all(oneTimeContext, tokens);
+ return oneTimeContext.output.join('');
+}
+
+function body(tokens) {
+ var oneTimeContext = context();
+ helpers.body(oneTimeContext, tokens);
+ return oneTimeContext.output.join('');
+}
+
+function property(tokens, position) {
+ var oneTimeContext = context();
+ helpers.property(oneTimeContext, tokens, position, true);
+ return oneTimeContext.output.join('');
+}
+
+function rules(tokens) {
+ var oneTimeContext = context();
+ helpers.rules(oneTimeContext, tokens);
+ return oneTimeContext.output.join('');
+}
+
+function value(tokens) {
+ var oneTimeContext = context();
+ helpers.value(oneTimeContext, tokens);
+ return oneTimeContext.output.join('');
+}
+
+module.exports = {
+ all: all,
+ body: body,
+ property: property,
+ rules: rules,
+ value: value
+};
+
+
+/***/ }),
+
+/***/ 6451:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var all = __webpack_require__(4502).all;
+
+function store(serializeContext, token) {
+ var value = typeof token == 'string' ?
+ token :
+ token[1];
+ var wrap = serializeContext.wrap;
+
+ wrap(serializeContext, value);
+ track(serializeContext, value);
+ serializeContext.output.push(value);
+}
+
+function wrap(serializeContext, value) {
+ if (serializeContext.column + value.length > serializeContext.format.wrapAt) {
+ track(serializeContext, serializeContext.format.breakWith);
+ serializeContext.output.push(serializeContext.format.breakWith);
+ }
+}
+
+function track(serializeContext, value) {
+ var parts = value.split('\n');
+
+ serializeContext.line += parts.length - 1;
+ serializeContext.column = parts.length > 1 ? 0 : (serializeContext.column + parts.pop().length);
+}
+
+function serializeStyles(tokens, context) {
+ var serializeContext = {
+ column: 0,
+ format: context.options.format,
+ indentBy: 0,
+ indentWith: '',
+ line: 1,
+ output: [],
+ spaceAfterClosingBrace: context.options.compatibility.properties.spaceAfterClosingBrace,
+ store: store,
+ wrap: context.options.format.wrapAt ?
+ wrap :
+ function () { /* noop */ }
+ };
+
+ all(serializeContext, tokens);
+
+ return {
+ styles: serializeContext.output.join('')
+ };
+}
+
+module.exports = serializeStyles;
+
+
+/***/ }),
+
+/***/ 6782:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var SourceMapGenerator = __webpack_require__(6389).SourceMapGenerator;
+var all = __webpack_require__(4502).all;
+
+var isRemoteResource = __webpack_require__(793);
+
+var isWindows = process.platform == 'win32';
+
+var NIX_SEPARATOR_PATTERN = /\//g;
+var UNKNOWN_SOURCE = '$stdin';
+var WINDOWS_SEPARATOR = '\\';
+
+function store(serializeContext, element) {
+ var fromString = typeof element == 'string';
+ var value = fromString ? element : element[1];
+ var mappings = fromString ? null : element[2];
+ var wrap = serializeContext.wrap;
+
+ wrap(serializeContext, value);
+ track(serializeContext, value, mappings);
+ serializeContext.output.push(value);
+}
+
+function wrap(serializeContext, value) {
+ if (serializeContext.column + value.length > serializeContext.format.wrapAt) {
+ track(serializeContext, serializeContext.format.breakWith, false);
+ serializeContext.output.push(serializeContext.format.breakWith);
+ }
+}
+
+function track(serializeContext, value, mappings) {
+ var parts = value.split('\n');
+
+ if (mappings) {
+ trackAllMappings(serializeContext, mappings);
+ }
+
+ serializeContext.line += parts.length - 1;
+ serializeContext.column = parts.length > 1 ? 0 : (serializeContext.column + parts.pop().length);
+}
+
+function trackAllMappings(serializeContext, mappings) {
+ for (var i = 0, l = mappings.length; i < l; i++) {
+ trackMapping(serializeContext, mappings[i]);
+ }
+}
+
+function trackMapping(serializeContext, mapping) {
+ var line = mapping[0];
+ var column = mapping[1];
+ var originalSource = mapping[2];
+ var source = originalSource;
+ var storedSource = source || UNKNOWN_SOURCE;
+
+ if (isWindows && source && !isRemoteResource(source)) {
+ storedSource = source.replace(NIX_SEPARATOR_PATTERN, WINDOWS_SEPARATOR);
+ }
+
+ serializeContext.outputMap.addMapping({
+ generated: {
+ line: serializeContext.line,
+ column: serializeContext.column
+ },
+ source: storedSource,
+ original: {
+ line: line,
+ column: column
+ }
+ });
+
+ if (serializeContext.inlineSources && (originalSource in serializeContext.sourcesContent)) {
+ serializeContext.outputMap.setSourceContent(storedSource, serializeContext.sourcesContent[originalSource]);
+ }
+}
+
+function serializeStylesAndSourceMap(tokens, context) {
+ var serializeContext = {
+ column: 0,
+ format: context.options.format,
+ indentBy: 0,
+ indentWith: '',
+ inlineSources: context.options.sourceMapInlineSources,
+ line: 1,
+ output: [],
+ outputMap: new SourceMapGenerator(),
+ sourcesContent: context.sourcesContent,
+ spaceAfterClosingBrace: context.options.compatibility.properties.spaceAfterClosingBrace,
+ store: store,
+ wrap: context.options.format.wrapAt ?
+ wrap :
+ function () { /* noop */ }
+ };
+
+ all(serializeContext, tokens);
+
+ return {
+ sourceMap: serializeContext.outputMap,
+ styles: serializeContext.output.join('')
+ };
+}
+
+module.exports = serializeStylesAndSourceMap;
+
+
+/***/ }),
+
+/***/ 4927:
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "Z": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+function toVal(mix) {
+ var k, y, str='';
+
+ if (typeof mix === 'string' || typeof mix === 'number') {
+ str += mix;
+ } else if (typeof mix === 'object') {
+ if (Array.isArray(mix)) {
+ for (k=0; k < mix.length; k++) {
+ if (mix[k]) {
+ if (y = toVal(mix[k])) {
+ str && (str += ' ');
+ str += y;
+ }
+ }
+ }
+ } else {
+ for (k in mix) {
+ if (mix[k]) {
+ str && (str += ' ');
+ str += k;
+ }
+ }
+ }
+ }
+
+ return str;
+}
+
+/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__() {
+ var i=0, tmp, x, str='';
+ while (i < arguments.length) {
+ if (tmp = arguments[i++]) {
+ if (x = toVal(tmp)) {
+ str && (str += ' ');
+ str += x
+ }
+ }
+ }
+ return str;
+}
+
+
+/***/ }),
+
+/***/ 8135:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* MIT license */
+/* eslint-disable no-mixed-operators */
+const cssKeywords = __webpack_require__(5411);
+
+// NOTE: conversions should only return primitive values (i.e. arrays, or
+// values that give correct `typeof` results).
+// do not use box values types (i.e. Number(), String(), etc.)
+
+const reverseKeywords = {};
+for (const key of Object.keys(cssKeywords)) {
+ reverseKeywords[cssKeywords[key]] = key;
+}
+
+const convert = {
+ rgb: {channels: 3, labels: 'rgb'},
+ hsl: {channels: 3, labels: 'hsl'},
+ hsv: {channels: 3, labels: 'hsv'},
+ hwb: {channels: 3, labels: 'hwb'},
+ cmyk: {channels: 4, labels: 'cmyk'},
+ xyz: {channels: 3, labels: 'xyz'},
+ lab: {channels: 3, labels: 'lab'},
+ lch: {channels: 3, labels: 'lch'},
+ hex: {channels: 1, labels: ['hex']},
+ keyword: {channels: 1, labels: ['keyword']},
+ ansi16: {channels: 1, labels: ['ansi16']},
+ ansi256: {channels: 1, labels: ['ansi256']},
+ hcg: {channels: 3, labels: ['h', 'c', 'g']},
+ apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
+ gray: {channels: 1, labels: ['gray']}
+};
+
+module.exports = convert;
+
+// Hide .channels and .labels properties
+for (const model of Object.keys(convert)) {
+ if (!('channels' in convert[model])) {
+ throw new Error('missing channels property: ' + model);
+ }
+
+ if (!('labels' in convert[model])) {
+ throw new Error('missing channel labels property: ' + model);
+ }
+
+ if (convert[model].labels.length !== convert[model].channels) {
+ throw new Error('channel and label counts mismatch: ' + model);
+ }
+
+ const {channels, labels} = convert[model];
+ delete convert[model].channels;
+ delete convert[model].labels;
+ Object.defineProperty(convert[model], 'channels', {value: channels});
+ Object.defineProperty(convert[model], 'labels', {value: labels});
+}
+
+convert.rgb.hsl = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const min = Math.min(r, g, b);
+ const max = Math.max(r, g, b);
+ const delta = max - min;
+ let h;
+ let s;
+
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
+
+ h = Math.min(h * 60, 360);
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ const l = (min + max) / 2;
+
+ if (max === min) {
+ s = 0;
+ } else if (l <= 0.5) {
+ s = delta / (max + min);
+ } else {
+ s = delta / (2 - max - min);
+ }
+
+ return [h, s * 100, l * 100];
+};
+
+convert.rgb.hsv = function (rgb) {
+ let rdif;
+ let gdif;
+ let bdif;
+ let h;
+ let s;
+
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const v = Math.max(r, g, b);
+ const diff = v - Math.min(r, g, b);
+ const diffc = function (c) {
+ return (v - c) / 6 / diff + 1 / 2;
+ };
+
+ if (diff === 0) {
+ h = 0;
+ s = 0;
+ } else {
+ s = diff / v;
+ rdif = diffc(r);
+ gdif = diffc(g);
+ bdif = diffc(b);
+
+ if (r === v) {
+ h = bdif - gdif;
+ } else if (g === v) {
+ h = (1 / 3) + rdif - bdif;
+ } else if (b === v) {
+ h = (2 / 3) + gdif - rdif;
+ }
+
+ if (h < 0) {
+ h += 1;
+ } else if (h > 1) {
+ h -= 1;
+ }
+ }
+
+ return [
+ h * 360,
+ s * 100,
+ v * 100
+ ];
+};
+
+convert.rgb.hwb = function (rgb) {
+ const r = rgb[0];
+ const g = rgb[1];
+ let b = rgb[2];
+ const h = convert.rgb.hsl(rgb)[0];
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
+
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
+
+ return [h, w * 100, b * 100];
+};
+
+convert.rgb.cmyk = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+
+ const k = Math.min(1 - r, 1 - g, 1 - b);
+ const c = (1 - r - k) / (1 - k) || 0;
+ const m = (1 - g - k) / (1 - k) || 0;
+ const y = (1 - b - k) / (1 - k) || 0;
+
+ return [c * 100, m * 100, y * 100, k * 100];
+};
+
+function comparativeDistance(x, y) {
+ /*
+ See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ */
+ return (
+ ((x[0] - y[0]) ** 2) +
+ ((x[1] - y[1]) ** 2) +
+ ((x[2] - y[2]) ** 2)
+ );
+}
+
+convert.rgb.keyword = function (rgb) {
+ const reversed = reverseKeywords[rgb];
+ if (reversed) {
+ return reversed;
+ }
+
+ let currentClosestDistance = Infinity;
+ let currentClosestKeyword;
+
+ for (const keyword of Object.keys(cssKeywords)) {
+ const value = cssKeywords[keyword];
+
+ // Compute comparative distance
+ const distance = comparativeDistance(rgb, value);
+
+ // Check if its less, if so set as closest
+ if (distance < currentClosestDistance) {
+ currentClosestDistance = distance;
+ currentClosestKeyword = keyword;
+ }
+ }
+
+ return currentClosestKeyword;
+};
+
+convert.keyword.rgb = function (keyword) {
+ return cssKeywords[keyword];
+};
+
+convert.rgb.xyz = function (rgb) {
+ let r = rgb[0] / 255;
+ let g = rgb[1] / 255;
+ let b = rgb[2] / 255;
+
+ // Assume sRGB
+ r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
+ g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
+ b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
+
+ const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
+ const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
+ const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
+
+ return [x * 100, y * 100, z * 100];
+};
+
+convert.rgb.lab = function (rgb) {
+ const xyz = convert.rgb.xyz(rgb);
+ let x = xyz[0];
+ let y = xyz[1];
+ let z = xyz[2];
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
+
+ const l = (116 * y) - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.hsl.rgb = function (hsl) {
+ const h = hsl[0] / 360;
+ const s = hsl[1] / 100;
+ const l = hsl[2] / 100;
+ let t2;
+ let t3;
+ let val;
+
+ if (s === 0) {
+ val = l * 255;
+ return [val, val, val];
+ }
+
+ if (l < 0.5) {
+ t2 = l * (1 + s);
+ } else {
+ t2 = l + s - l * s;
+ }
+
+ const t1 = 2 * l - t2;
+
+ const rgb = [0, 0, 0];
+ for (let i = 0; i < 3; i++) {
+ t3 = h + 1 / 3 * -(i - 1);
+ if (t3 < 0) {
+ t3++;
+ }
+
+ if (t3 > 1) {
+ t3--;
+ }
+
+ if (6 * t3 < 1) {
+ val = t1 + (t2 - t1) * 6 * t3;
+ } else if (2 * t3 < 1) {
+ val = t2;
+ } else if (3 * t3 < 2) {
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ } else {
+ val = t1;
+ }
+
+ rgb[i] = val * 255;
+ }
+
+ return rgb;
+};
+
+convert.hsl.hsv = function (hsl) {
+ const h = hsl[0];
+ let s = hsl[1] / 100;
+ let l = hsl[2] / 100;
+ let smin = s;
+ const lmin = Math.max(l, 0.01);
+
+ l *= 2;
+ s *= (l <= 1) ? l : 2 - l;
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
+ const v = (l + s) / 2;
+ const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
+
+ return [h, sv * 100, v * 100];
+};
+
+convert.hsv.rgb = function (hsv) {
+ const h = hsv[0] / 60;
+ const s = hsv[1] / 100;
+ let v = hsv[2] / 100;
+ const hi = Math.floor(h) % 6;
+
+ const f = h - Math.floor(h);
+ const p = 255 * v * (1 - s);
+ const q = 255 * v * (1 - (s * f));
+ const t = 255 * v * (1 - (s * (1 - f)));
+ v *= 255;
+
+ switch (hi) {
+ case 0:
+ return [v, t, p];
+ case 1:
+ return [q, v, p];
+ case 2:
+ return [p, v, t];
+ case 3:
+ return [p, q, v];
+ case 4:
+ return [t, p, v];
+ case 5:
+ return [v, p, q];
+ }
+};
+
+convert.hsv.hsl = function (hsv) {
+ const h = hsv[0];
+ const s = hsv[1] / 100;
+ const v = hsv[2] / 100;
+ const vmin = Math.max(v, 0.01);
+ let sl;
+ let l;
+
+ l = (2 - s) * v;
+ const lmin = (2 - s) * vmin;
+ sl = s * vmin;
+ sl /= (lmin <= 1) ? lmin : 2 - lmin;
+ sl = sl || 0;
+ l /= 2;
+
+ return [h, sl * 100, l * 100];
+};
+
+// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+convert.hwb.rgb = function (hwb) {
+ const h = hwb[0] / 360;
+ let wh = hwb[1] / 100;
+ let bl = hwb[2] / 100;
+ const ratio = wh + bl;
+ let f;
+
+ // Wh + bl cant be > 1
+ if (ratio > 1) {
+ wh /= ratio;
+ bl /= ratio;
+ }
+
+ const i = Math.floor(6 * h);
+ const v = 1 - bl;
+ f = 6 * h - i;
+
+ if ((i & 0x01) !== 0) {
+ f = 1 - f;
+ }
+
+ const n = wh + f * (v - wh); // Linear interpolation
+
+ let r;
+ let g;
+ let b;
+ /* eslint-disable max-statements-per-line,no-multi-spaces */
+ switch (i) {
+ default:
+ case 6:
+ case 0: r = v; g = n; b = wh; break;
+ case 1: r = n; g = v; b = wh; break;
+ case 2: r = wh; g = v; b = n; break;
+ case 3: r = wh; g = n; b = v; break;
+ case 4: r = n; g = wh; b = v; break;
+ case 5: r = v; g = wh; b = n; break;
+ }
+ /* eslint-enable max-statements-per-line,no-multi-spaces */
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.cmyk.rgb = function (cmyk) {
+ const c = cmyk[0] / 100;
+ const m = cmyk[1] / 100;
+ const y = cmyk[2] / 100;
+ const k = cmyk[3] / 100;
+
+ const r = 1 - Math.min(1, c * (1 - k) + k);
+ const g = 1 - Math.min(1, m * (1 - k) + k);
+ const b = 1 - Math.min(1, y * (1 - k) + k);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.rgb = function (xyz) {
+ const x = xyz[0] / 100;
+ const y = xyz[1] / 100;
+ const z = xyz[2] / 100;
+ let r;
+ let g;
+ let b;
+
+ r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
+ g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
+ b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
+
+ // Assume sRGB
+ r = r > 0.0031308
+ ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
+ : r * 12.92;
+
+ g = g > 0.0031308
+ ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
+ : g * 12.92;
+
+ b = b > 0.0031308
+ ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
+ : b * 12.92;
+
+ r = Math.min(Math.max(0, r), 1);
+ g = Math.min(Math.max(0, g), 1);
+ b = Math.min(Math.max(0, b), 1);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.lab = function (xyz) {
+ let x = xyz[0];
+ let y = xyz[1];
+ let z = xyz[2];
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
+
+ const l = (116 * y) - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.lab.xyz = function (lab) {
+ const l = lab[0];
+ const a = lab[1];
+ const b = lab[2];
+ let x;
+ let y;
+ let z;
+
+ y = (l + 16) / 116;
+ x = a / 500 + y;
+ z = y - b / 200;
+
+ const y2 = y ** 3;
+ const x2 = x ** 3;
+ const z2 = z ** 3;
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
+
+ x *= 95.047;
+ y *= 100;
+ z *= 108.883;
+
+ return [x, y, z];
+};
+
+convert.lab.lch = function (lab) {
+ const l = lab[0];
+ const a = lab[1];
+ const b = lab[2];
+ let h;
+
+ const hr = Math.atan2(b, a);
+ h = hr * 360 / 2 / Math.PI;
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ const c = Math.sqrt(a * a + b * b);
+
+ return [l, c, h];
+};
+
+convert.lch.lab = function (lch) {
+ const l = lch[0];
+ const c = lch[1];
+ const h = lch[2];
+
+ const hr = h / 360 * 2 * Math.PI;
+ const a = c * Math.cos(hr);
+ const b = c * Math.sin(hr);
+
+ return [l, a, b];
+};
+
+convert.rgb.ansi16 = function (args, saturation = null) {
+ const [r, g, b] = args;
+ let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
+
+ value = Math.round(value / 50);
+
+ if (value === 0) {
+ return 30;
+ }
+
+ let ansi = 30
+ + ((Math.round(b / 255) << 2)
+ | (Math.round(g / 255) << 1)
+ | Math.round(r / 255));
+
+ if (value === 2) {
+ ansi += 60;
+ }
+
+ return ansi;
+};
+
+convert.hsv.ansi16 = function (args) {
+ // Optimization here; we already know the value and don't need to get
+ // it converted for us.
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
+};
+
+convert.rgb.ansi256 = function (args) {
+ const r = args[0];
+ const g = args[1];
+ const b = args[2];
+
+ // We use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (r === g && g === b) {
+ if (r < 8) {
+ return 16;
+ }
+
+ if (r > 248) {
+ return 231;
+ }
+
+ return Math.round(((r - 8) / 247) * 24) + 232;
+ }
+
+ const ansi = 16
+ + (36 * Math.round(r / 255 * 5))
+ + (6 * Math.round(g / 255 * 5))
+ + Math.round(b / 255 * 5);
+
+ return ansi;
+};
+
+convert.ansi16.rgb = function (args) {
+ let color = args % 10;
+
+ // Handle greyscale
+ if (color === 0 || color === 7) {
+ if (args > 50) {
+ color += 3.5;
+ }
+
+ color = color / 10.5 * 255;
+
+ return [color, color, color];
+ }
+
+ const mult = (~~(args > 50) + 1) * 0.5;
+ const r = ((color & 1) * mult) * 255;
+ const g = (((color >> 1) & 1) * mult) * 255;
+ const b = (((color >> 2) & 1) * mult) * 255;
+
+ return [r, g, b];
+};
+
+convert.ansi256.rgb = function (args) {
+ // Handle greyscale
+ if (args >= 232) {
+ const c = (args - 232) * 10 + 8;
+ return [c, c, c];
+ }
+
+ args -= 16;
+
+ let rem;
+ const r = Math.floor(args / 36) / 5 * 255;
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+ const b = (rem % 6) / 5 * 255;
+
+ return [r, g, b];
+};
+
+convert.rgb.hex = function (args) {
+ const integer = ((Math.round(args[0]) & 0xFF) << 16)
+ + ((Math.round(args[1]) & 0xFF) << 8)
+ + (Math.round(args[2]) & 0xFF);
+
+ const string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.hex.rgb = function (args) {
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ if (!match) {
+ return [0, 0, 0];
+ }
+
+ let colorString = match[0];
+
+ if (match[0].length === 3) {
+ colorString = colorString.split('').map(char => {
+ return char + char;
+ }).join('');
+ }
+
+ const integer = parseInt(colorString, 16);
+ const r = (integer >> 16) & 0xFF;
+ const g = (integer >> 8) & 0xFF;
+ const b = integer & 0xFF;
+
+ return [r, g, b];
+};
+
+convert.rgb.hcg = function (rgb) {
+ const r = rgb[0] / 255;
+ const g = rgb[1] / 255;
+ const b = rgb[2] / 255;
+ const max = Math.max(Math.max(r, g), b);
+ const min = Math.min(Math.min(r, g), b);
+ const chroma = (max - min);
+ let grayscale;
+ let hue;
+
+ if (chroma < 1) {
+ grayscale = min / (1 - chroma);
+ } else {
+ grayscale = 0;
+ }
+
+ if (chroma <= 0) {
+ hue = 0;
+ } else
+ if (max === r) {
+ hue = ((g - b) / chroma) % 6;
+ } else
+ if (max === g) {
+ hue = 2 + (b - r) / chroma;
+ } else {
+ hue = 4 + (r - g) / chroma;
+ }
+
+ hue /= 6;
+ hue %= 1;
+
+ return [hue * 360, chroma * 100, grayscale * 100];
+};
+
+convert.hsl.hcg = function (hsl) {
+ const s = hsl[1] / 100;
+ const l = hsl[2] / 100;
+
+ const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
+
+ let f = 0;
+ if (c < 1.0) {
+ f = (l - 0.5 * c) / (1.0 - c);
+ }
+
+ return [hsl[0], c * 100, f * 100];
+};
+
+convert.hsv.hcg = function (hsv) {
+ const s = hsv[1] / 100;
+ const v = hsv[2] / 100;
+
+ const c = s * v;
+ let f = 0;
+
+ if (c < 1.0) {
+ f = (v - c) / (1 - c);
+ }
+
+ return [hsv[0], c * 100, f * 100];
+};
+
+convert.hcg.rgb = function (hcg) {
+ const h = hcg[0] / 360;
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ if (c === 0.0) {
+ return [g * 255, g * 255, g * 255];
+ }
+
+ const pure = [0, 0, 0];
+ const hi = (h % 1) * 6;
+ const v = hi % 1;
+ const w = 1 - v;
+ let mg = 0;
+
+ /* eslint-disable max-statements-per-line */
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1; pure[1] = v; pure[2] = 0; break;
+ case 1:
+ pure[0] = w; pure[1] = 1; pure[2] = 0; break;
+ case 2:
+ pure[0] = 0; pure[1] = 1; pure[2] = v; break;
+ case 3:
+ pure[0] = 0; pure[1] = w; pure[2] = 1; break;
+ case 4:
+ pure[0] = v; pure[1] = 0; pure[2] = 1; break;
+ default:
+ pure[0] = 1; pure[1] = 0; pure[2] = w;
+ }
+ /* eslint-enable max-statements-per-line */
+
+ mg = (1.0 - c) * g;
+
+ return [
+ (c * pure[0] + mg) * 255,
+ (c * pure[1] + mg) * 255,
+ (c * pure[2] + mg) * 255
+ ];
+};
+
+convert.hcg.hsv = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ const v = c + g * (1.0 - c);
+ let f = 0;
+
+ if (v > 0.0) {
+ f = c / v;
+ }
+
+ return [hcg[0], f * 100, v * 100];
+};
+
+convert.hcg.hsl = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+
+ const l = g * (1.0 - c) + 0.5 * c;
+ let s = 0;
+
+ if (l > 0.0 && l < 0.5) {
+ s = c / (2 * l);
+ } else
+ if (l >= 0.5 && l < 1.0) {
+ s = c / (2 * (1 - l));
+ }
+
+ return [hcg[0], s * 100, l * 100];
+};
+
+convert.hcg.hwb = function (hcg) {
+ const c = hcg[1] / 100;
+ const g = hcg[2] / 100;
+ const v = c + g * (1.0 - c);
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
+};
+
+convert.hwb.hcg = function (hwb) {
+ const w = hwb[1] / 100;
+ const b = hwb[2] / 100;
+ const v = 1 - b;
+ const c = v - w;
+ let g = 0;
+
+ if (c < 1) {
+ g = (v - c) / (1 - c);
+ }
+
+ return [hwb[0], c * 100, g * 100];
+};
+
+convert.apple.rgb = function (apple) {
+ return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
+};
+
+convert.rgb.apple = function (rgb) {
+ return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
+};
+
+convert.gray.rgb = function (args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+};
+
+convert.gray.hsl = function (args) {
+ return [0, 0, args[0]];
+};
+
+convert.gray.hsv = convert.gray.hsl;
+
+convert.gray.hwb = function (gray) {
+ return [0, 100, gray[0]];
+};
+
+convert.gray.cmyk = function (gray) {
+ return [0, 0, 0, gray[0]];
+};
+
+convert.gray.lab = function (gray) {
+ return [gray[0], 0, 0];
+};
+
+convert.gray.hex = function (gray) {
+ const val = Math.round(gray[0] / 100 * 255) & 0xFF;
+ const integer = (val << 16) + (val << 8) + val;
+
+ const string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.rgb.gray = function (rgb) {
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+ return [val / 255 * 100];
+};
+
+
+/***/ }),
+
+/***/ 1492:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+const conversions = __webpack_require__(8135);
+const route = __webpack_require__(756);
+
+const convert = {};
+
+const models = Object.keys(conversions);
+
+function wrapRaw(fn) {
+ const wrappedFn = function (...args) {
+ const arg0 = args[0];
+ if (arg0 === undefined || arg0 === null) {
+ return arg0;
+ }
+
+ if (arg0.length > 1) {
+ args = arg0;
+ }
+
+ return fn(args);
+ };
+
+ // Preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+function wrapRounded(fn) {
+ const wrappedFn = function (...args) {
+ const arg0 = args[0];
+
+ if (arg0 === undefined || arg0 === null) {
+ return arg0;
+ }
+
+ if (arg0.length > 1) {
+ args = arg0;
+ }
+
+ const result = fn(args);
+
+ // We're assuming the result is an array here.
+ // see notice in conversions.js; don't use box types
+ // in conversion functions.
+ if (typeof result === 'object') {
+ for (let len = result.length, i = 0; i < len; i++) {
+ result[i] = Math.round(result[i]);
+ }
+ }
+
+ return result;
+ };
+
+ // Preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+models.forEach(fromModel => {
+ convert[fromModel] = {};
+
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
+
+ const routes = route(fromModel);
+ const routeModels = Object.keys(routes);
+
+ routeModels.forEach(toModel => {
+ const fn = routes[toModel];
+
+ convert[fromModel][toModel] = wrapRounded(fn);
+ convert[fromModel][toModel].raw = wrapRaw(fn);
+ });
+});
+
+module.exports = convert;
+
+
+/***/ }),
+
+/***/ 756:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+const conversions = __webpack_require__(8135);
+
+/*
+ This function routes a model to all other models.
+
+ all functions that are routed have a property `.conversion` attached
+ to the returned synthetic function. This property is an array
+ of strings, each with the steps in between the 'from' and 'to'
+ color models (inclusive).
+
+ conversions that are not possible simply are not included.
+*/
+
+function buildGraph() {
+ const graph = {};
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
+ const models = Object.keys(conversions);
+
+ for (let len = models.length, i = 0; i < len; i++) {
+ graph[models[i]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
+ }
+
+ return graph;
+}
+
+// https://en.wikipedia.org/wiki/Breadth-first_search
+function deriveBFS(fromModel) {
+ const graph = buildGraph();
+ const queue = [fromModel]; // Unshift -> queue -> pop
+
+ graph[fromModel].distance = 0;
+
+ while (queue.length) {
+ const current = queue.pop();
+ const adjacents = Object.keys(conversions[current]);
+
+ for (let len = adjacents.length, i = 0; i < len; i++) {
+ const adjacent = adjacents[i];
+ const node = graph[adjacent];
+
+ if (node.distance === -1) {
+ node.distance = graph[current].distance + 1;
+ node.parent = current;
+ queue.unshift(adjacent);
+ }
+ }
+ }
+
+ return graph;
+}
+
+function link(from, to) {
+ return function (args) {
+ return to(from(args));
+ };
+}
+
+function wrapConversion(toModel, graph) {
+ const path = [graph[toModel].parent, toModel];
+ let fn = conversions[graph[toModel].parent][toModel];
+
+ let cur = graph[toModel].parent;
+ while (graph[cur].parent) {
+ path.unshift(graph[cur].parent);
+ fn = link(conversions[graph[cur].parent][cur], fn);
+ cur = graph[cur].parent;
+ }
+
+ fn.conversion = path;
+ return fn;
+}
+
+module.exports = function (fromModel) {
+ const graph = deriveBFS(fromModel);
+ const conversion = {};
+
+ const models = Object.keys(graph);
+ for (let len = models.length, i = 0; i < len; i++) {
+ const toModel = models[i];
+ const node = graph[toModel];
+
+ if (node.parent === null) {
+ // No possible conversion, or this node is the source model.
+ continue;
+ }
+
+ conversion[toModel] = wrapConversion(toModel, graph);
+ }
+
+ return conversion;
+};
+
+
+
+/***/ }),
+
+/***/ 5411:
+/***/ ((module) => {
+
+"use strict";
+
+
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "darkkhaki": [189, 183, 107],
+ "darkmagenta": [139, 0, 139],
+ "darkolivegreen": [85, 107, 47],
+ "darkorange": [255, 140, 0],
+ "darkorchid": [153, 50, 204],
+ "darkred": [139, 0, 0],
+ "darksalmon": [233, 150, 122],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
+};
+
+
+/***/ }),
+
+/***/ 7287:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const fs = __webpack_require__(952)
+const path = __webpack_require__(5622)
+const mkdirsSync = __webpack_require__(3410).mkdirsSync
+const utimesMillisSync = __webpack_require__(5671).utimesMillisSync
+const stat = __webpack_require__(3732)
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
+ stat.checkParentPathsSync(src, srcStat, dest, 'copy')
+ return handleFilterAndCopy(destStat, src, dest, opts)
+}
+
+function handleFilterAndCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirsSync(destParent)
+ return getStats(destStat, src, dest, opts)
+}
+
+function startCopy (destStat, src, dest, opts) {
+ if (opts.filter && !opts.filter(src, dest)) return
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+ else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
+ else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
+ throw new Error(`Unknown file: ${src}`)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ fs.copyFileSync(src, dest)
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
+ return setDestMode(dest, srcStat.mode)
+}
+
+function handleTimestamps (srcMode, src, dest) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
+ return setDestTimestamps(src, dest)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode) {
+ return setDestMode(dest, srcMode | 0o200)
+}
+
+function setDestMode (dest, srcMode) {
+ return fs.chmodSync(dest, srcMode)
+}
+
+function setDestTimestamps (src, dest) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ const updatedSrcStat = fs.statSync(src)
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return setDestMode(dest, srcMode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
+ return startCopy(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+module.exports = copySync
+
+
+/***/ }),
+
+/***/ 96:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+module.exports = {
+ copySync: __webpack_require__(7287)
+}
+
+
+/***/ }),
+
+/***/ 3017:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const fs = __webpack_require__(952)
+const path = __webpack_require__(5622)
+const mkdirs = __webpack_require__(3410).mkdirs
+const pathExists = __webpack_require__(4059).pathExists
+const utimesMillis = __webpack_require__(5671).utimesMillis
+const stat = __webpack_require__(3732)
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
+ see https://github.com/jprichardson/node-fs-extra/issues/269`)
+ }
+
+ stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
+ if (err) return cb(err)
+ if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
+ return checkParentDir(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return getStats(destStat, src, dest, opts, cb)
+ mkdirs(destParent, err => {
+ if (err) return cb(err)
+ return getStats(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function handleFilter (onInclude, destStat, src, dest, opts, cb) {
+ Promise.resolve(opts.filter(src, dest)).then(include => {
+ if (include) return onInclude(destStat, src, dest, opts, cb)
+ return cb()
+ }, error => cb(error))
+}
+
+function startCopy (destStat, src, dest, opts, cb) {
+ if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
+ return getStats(destStat, src, dest, opts, cb)
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
+ else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
+ return cb(new Error(`Unknown file: ${src}`))
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
+ return setDestMode(dest, srcStat.mode, cb)
+ })
+}
+
+function handleTimestampsAndMode (srcMode, src, dest, cb) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) {
+ return makeFileWritable(dest, srcMode, err => {
+ if (err) return cb(err)
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+ })
+ }
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode, cb) {
+ return setDestMode(dest, srcMode | 0o200, cb)
+}
+
+function setDestTimestampsAndMode (srcMode, src, dest, cb) {
+ setDestTimestamps(src, dest, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+}
+
+function setDestMode (dest, srcMode, cb) {
+ return fs.chmod(dest, srcMode, cb)
+}
+
+function setDestTimestamps (src, dest, cb) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ fs.stat(src, (err, updatedSrcStat) => {
+ if (err) return cb(err)
+ return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { destStat } = stats
+ startCopy(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+module.exports = copy
+
+
+/***/ }),
+
+/***/ 9946:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const u = __webpack_require__(1637).fromCallback
+module.exports = {
+ copy: u(__webpack_require__(3017))
+}
+
+
+/***/ }),
+
+/***/ 4415:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const u = __webpack_require__(1637).fromPromise
+const fs = __webpack_require__(3997)
+const path = __webpack_require__(5622)
+const mkdir = __webpack_require__(3410)
+const remove = __webpack_require__(7885)
+
+const emptyDir = u(async function emptyDir (dir) {
+ let items
+ try {
+ items = await fs.readdir(dir)
+ } catch {
+ return mkdir.mkdirs(dir)
+ }
+
+ return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
+
+
+/***/ }),
+
+/***/ 5935:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const u = __webpack_require__(1637).fromCallback
+const path = __webpack_require__(5622)
+const fs = __webpack_require__(952)
+const mkdir = __webpack_require__(3410)
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ fs.stat(dir, (err, stats) => {
+ if (err) {
+ // if the directory doesn't exist, make it
+ if (err.code === 'ENOENT') {
+ return mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ }
+ return callback(err)
+ }
+
+ if (stats.isDirectory()) makeFile()
+ else {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdir(dir, err => {
+ if (err) return callback(err)
+ })
+ }
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ try {
+ if (!fs.statSync(dir).isDirectory()) {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdirSync(dir)
+ }
+ } catch (err) {
+ // If the stat call above failed because the directory doesn't exist, create it
+ if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
+ else throw err
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
+
+
+/***/ }),
+
+/***/ 7881:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const file = __webpack_require__(5935)
+const link = __webpack_require__(4869)
+const symlink = __webpack_require__(2996)
+
+module.exports = {
+ // file
+ createFile: file.createFile,
+ createFileSync: file.createFileSync,
+ ensureFile: file.createFile,
+ ensureFileSync: file.createFileSync,
+ // link
+ createLink: link.createLink,
+ createLinkSync: link.createLinkSync,
+ ensureLink: link.createLink,
+ ensureLinkSync: link.createLinkSync,
+ // symlink
+ createSymlink: symlink.createSymlink,
+ createSymlinkSync: symlink.createSymlinkSync,
+ ensureSymlink: symlink.createSymlink,
+ ensureSymlinkSync: symlink.createSymlinkSync
+}
+
+
+/***/ }),
+
+/***/ 4869:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const u = __webpack_require__(1637).fromCallback
+const path = __webpack_require__(5622)
+const fs = __webpack_require__(952)
+const mkdir = __webpack_require__(3410)
+const pathExists = __webpack_require__(4059).pathExists
+const { areIdentical } = __webpack_require__(3732)
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ fs.lstat(dstpath, (_, dstStat) => {
+ fs.lstat(srcpath, (err, srcStat) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+ if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ let dstStat
+ try {
+ dstStat = fs.lstatSync(dstpath)
+ } catch {}
+
+ try {
+ const srcStat = fs.lstatSync(srcpath)
+ if (dstStat && areIdentical(srcStat, dstStat)) return
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
+
+
+/***/ }),
+
+/***/ 6613:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const path = __webpack_require__(5622)
+const fs = __webpack_require__(952)
+const pathExists = __webpack_require__(4059).pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
+
+
+/***/ }),
+
+/***/ 4037:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const fs = __webpack_require__(952)
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
+
+
+/***/ }),
+
+/***/ 2996:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const u = __webpack_require__(1637).fromCallback
+const path = __webpack_require__(5622)
+const fs = __webpack_require__(3997)
+const _mkdirs = __webpack_require__(3410)
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = __webpack_require__(6613)
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = __webpack_require__(4037)
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = __webpack_require__(4059).pathExists
+
+const { areIdentical } = __webpack_require__(3732)
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ fs.lstat(dstpath, (err, stats) => {
+ if (!err && stats.isSymbolicLink()) {
+ Promise.all([
+ fs.stat(srcpath),
+ fs.stat(dstpath)
+ ]).then(([srcStat, dstStat]) => {
+ if (areIdentical(srcStat, dstStat)) return callback(null)
+ _createSymlink(srcpath, dstpath, type, callback)
+ })
+ } else _createSymlink(srcpath, dstpath, type, callback)
+ })
+}
+
+function _createSymlink (srcpath, dstpath, type, callback) {
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ let stats
+ try {
+ stats = fs.lstatSync(dstpath)
+ } catch {}
+ if (stats && stats.isSymbolicLink()) {
+ const srcStat = fs.statSync(srcpath)
+ const dstStat = fs.statSync(dstpath)
+ if (areIdentical(srcStat, dstStat)) return
+ }
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
+
+
+/***/ }),
+
+/***/ 3997:
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+"use strict";
+
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = __webpack_require__(1637).fromCallback
+const fs = __webpack_require__(952)
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchmod',
+ 'lchown',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'opendir',
+ 'readdir',
+ 'readFile',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rm',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.opendir was added in Node.js v12.12.0
+ // fs.rm was added in Node.js v14.14.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export cloned fs:
+Object.assign(exports, fs)
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+exports.realpath.native = u(fs.realpath.native)
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
+
+// fs.writev only available in Node v12.9.0+
+if (typeof fs.writev === 'function') {
+ // Function signature is
+ // s.writev(fd, buffers[, position], callback)
+ // We need to handle the optional arg, so we use ...args
+ exports.writev = function (fd, buffers, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.writev(fd, buffers, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffers })
+ })
+ })
+ }
+}
+
+
+/***/ }),
+
+/***/ 1742:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+module.exports = {
+ // Export promiseified graceful-fs:
+ ...__webpack_require__(3997),
+ // Export extra methods:
+ ...__webpack_require__(96),
+ ...__webpack_require__(9946),
+ ...__webpack_require__(4415),
+ ...__webpack_require__(7881),
+ ...__webpack_require__(7545),
+ ...__webpack_require__(3410),
+ ...__webpack_require__(4121),
+ ...__webpack_require__(5786),
+ ...__webpack_require__(2290),
+ ...__webpack_require__(4059),
+ ...__webpack_require__(7885)
+}
+
+
+/***/ }),
+
+/***/ 7545:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const u = __webpack_require__(1637).fromPromise
+const jsonFile = __webpack_require__(5754)
+
+jsonFile.outputJson = u(__webpack_require__(660))
+jsonFile.outputJsonSync = __webpack_require__(4220)
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
+
+
+/***/ }),
+
+/***/ 5754:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const jsonFile = __webpack_require__(6336)
+
+module.exports = {
+ // jsonfile exports
+ readJson: jsonFile.readFile,
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: jsonFile.writeFile,
+ writeJsonSync: jsonFile.writeFileSync
+}
+
+
+/***/ }),
+
+/***/ 4220:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const { stringify } = __webpack_require__(4530)
+const { outputFileSync } = __webpack_require__(2290)
+
+function outputJsonSync (file, data, options) {
+ const str = stringify(data, options)
+
+ outputFileSync(file, str, options)
+}
+
+module.exports = outputJsonSync
+
+
+/***/ }),
+
+/***/ 660:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+const { stringify } = __webpack_require__(4530)
+const { outputFile } = __webpack_require__(2290)
+
+async function outputJson (file, data, options = {}) {
+ const str = stringify(data, options)
+
+ await outputFile(file, str, options)
+}
+
+module.exports = outputJson
+
+
+/***/ }),
+
+/***/ 3410:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+const u = __webpack_require__(1637).fromPromise
+const { makeDir: _makeDir, makeDirSync } = __webpack_require__(3422)
+const makeDir = u(_makeDir)
+
+module.exports = {
+ mkdirs: makeDir,
+ mkdirsSync: makeDirSync,
+ // alias
+ mkdirp: makeDir,
+ mkdirpSync: makeDirSync,
+ ensureDir: makeDir,
+ ensureDirSync: makeDirSync
+}
+
+
+/***/ }),
+
+/***/ 3422:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+const fs = __webpack_require__(3997)
+const { checkPath } = __webpack_require__(691)
+
+const getMode = options => {
+ const defaults = { mode: 0o777 }
+ if (typeof options === 'number') return options
+ return ({ ...defaults, ...options }).mode
+}
+
+module.exports.makeDir = async (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdir(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
+
+module.exports.makeDirSync = (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdirSync(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
+
+
+/***/ }),
+
+/***/ 691:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+// Adapted from https://github.com/sindresorhus/make-dir
+// Copyright (c) Sindre Sorhus
-
-
Document
Github
-
')
- .replace(/\\n/g, q === 2 ? '
' : ' ');
- }
-
- function createDialogue(dialogue) {
- var this$1 = this;
-
- var $div = document.createElement('div');
- $div.className = 'ASS-dialogue';
- var df = document.createDocumentFragment();
- var slices = dialogue.slices;
- var start = dialogue.start;
- var end = dialogue.end;
- slices.forEach(function (slice) {
- var borderStyle = slice.borderStyle;
- slice.fragments.forEach(function (fragment) {
- var text = fragment.text;
- var drawing = fragment.drawing;
- var animationName = fragment.animationName;
- var tag = assign({}, slice.tag, fragment.tag);
- var cssText = 'display:inline-block;';
- var vct = this$1.video.currentTime;
- if (!drawing) {
- cssText += "font-family:\"" + (tag.fn) + "\",Arial;";
- cssText += "font-size:" + (this$1.scale * getRealFontSize(tag.fn, tag.fs)) + "px;";
- cssText += "color:" + (color2rgba(tag.a1 + tag.c1)) + ";";
- var scale = /Yes/i.test(this$1.info.ScaledBorderAndShadow) ? this$1.scale : 1;
- if (borderStyle === 1) {
- cssText += "text-shadow:" + (createCSSStroke(tag, scale)) + ";";
- }
- if (borderStyle === 3) {
- cssText += (
- "background-color:" + (color2rgba(tag.a3 + tag.c3)) + ";"
- + "box-shadow:" + (createCSSStroke(tag, scale)) + ";"
- );
- }
- cssText += tag.b ? ("font-weight:" + (tag.b === 1 ? 'bold' : tag.b) + ";") : '';
- cssText += tag.i ? 'font-style:italic;' : '';
- cssText += (tag.u || tag.s) ? ("text-decoration:" + (tag.u ? 'underline' : '') + " " + (tag.s ? 'line-through' : '') + ";") : '';
- cssText += tag.fsp ? ("letter-spacing:" + (tag.fsp) + "px;") : '';
- // TODO: (tag.q === 0) and (tag.q === 3) are not implemented yet,
- // for now just handle it as (tag.q === 1)
- if (tag.q === 1 || tag.q === 0 || tag.q === 3) {
- cssText += 'word-break:break-all;white-space:normal;';
- }
- if (tag.q === 2) {
- cssText += 'word-break:normal;white-space:nowrap;';
- }
- }
- var hasTransfrom = transformTags.some(function (x) { return (
- /^fsc[xy]$/.test(x) ? tag[x] !== 100 : !!tag[x]
- ); });
- if (hasTransfrom) {
- cssText += (vendor.transform) + "transform:" + (createTransform(tag)) + ";";
- if (!drawing) {
- cssText += 'transform-style:preserve-3d;word-break:normal;white-space:nowrap;';
- }
- }
- if (animationName) {
- cssText += createAnimation(animationName, end - start, Math.min(0, start - vct));
- }
- if (drawing && tag.pbo) {
- var pbo = this$1.scale * -tag.pbo * (tag.fscy || 100) / 100;
- cssText += "vertical-align:" + pbo + "px;";
- }
-
- var hasRotate = /"fr[xyz]":[^0]/.test(JSON.stringify(tag));
- encodeText(text, tag.q).split('
').forEach(function (html, idx) {
- var $span = document.createElement('span');
- $span.dataset.hasRotate = hasRotate;
- if (drawing) {
- var obj = createDrawing.call(this$1, fragment, slice.tag);
- $span.style.cssText = obj.cssText;
- $span.appendChild(obj.$svg);
- } else {
- if (idx) {
- df.appendChild(document.createElement('br'));
- }
- if (!html) {
- return;
- }
- $span.innerHTML = html;
- }
- // TODO: maybe it can be optimized
- $span.style.cssText += cssText;
- df.appendChild($span);
- });
- });
- });
- $div.appendChild(df);
- return $div;
- }
-
- function allocate(dialogue) {
- var layer = dialogue.layer;
- var margin = dialogue.margin;
- var width = dialogue.width;
- var height = dialogue.height;
- var alignment = dialogue.alignment;
- var end = dialogue.end;
- var stageWidth = this.width - (this.scale * (margin.left + margin.right) | 0);
- var stageHeight = this.height;
- var vertical = this.scale * margin.vertical | 0;
- var vct = this.video.currentTime * 100;
- this._.space[layer] = this._.space[layer] || {
- left: { width: new Uint16Array(stageHeight + 1), end: new Uint16Array(stageHeight + 1) },
- center: { width: new Uint16Array(stageHeight + 1), end: new Uint16Array(stageHeight + 1) },
- right: { width: new Uint16Array(stageHeight + 1), end: new Uint16Array(stageHeight + 1) },
- };
- var channel = this._.space[layer];
- var align = ['right', 'left', 'center'][alignment % 3];
- var willCollide = function (y) {
- var lw = channel.left.width[y];
- var cw = channel.center.width[y];
- var rw = channel.right.width[y];
- var le = channel.left.end[y];
- var ce = channel.center.end[y];
- var re = channel.right.end[y];
- return (
- (align === 'left' && (
- (le > vct && lw)
- || (ce > vct && cw && 2 * width + cw > stageWidth)
- || (re > vct && rw && width + rw > stageWidth)
- ))
- || (align === 'center' && (
- (le > vct && lw && 2 * lw + width > stageWidth)
- || (ce > vct && cw)
- || (re > vct && rw && 2 * rw + width > stageWidth)
- ))
- || (align === 'right' && (
- (le > vct && lw && lw + width > stageWidth)
- || (ce > vct && cw && 2 * width + cw > stageWidth)
- || (re > vct && rw)
- ))
- );
- };
- var count = 0;
- var result = 0;
- var find = function (y) {
- count = willCollide(y) ? 0 : count + 1;
- if (count >= height) {
- result = y;
- return true;
- }
- return false;
- };
- if (alignment <= 3) {
- for (var i = stageHeight - vertical - 1; i > vertical; i--) {
- if (find(i)) { break; }
- }
- } else if (alignment >= 7) {
- for (var i$1 = vertical + 1; i$1 < stageHeight - vertical; i$1++) {
- if (find(i$1)) { break; }
- }
- } else {
- for (var i$2 = (stageHeight - height) >> 1; i$2 < stageHeight - vertical; i$2++) {
- if (find(i$2)) { break; }
- }
- }
- if (alignment > 3) {
- result -= height - 1;
- }
- for (var i$3 = result; i$3 < result + height; i$3++) {
- channel[align].width[i$3] = width;
- channel[align].end[i$3] = end * 100;
- }
- return result;
- }
-
- function getPosition(dialogue) {
- var effect = dialogue.effect;
- var move = dialogue.move;
- var alignment = dialogue.alignment;
- var width = dialogue.width;
- var height = dialogue.height;
- var margin = dialogue.margin;
- var slices = dialogue.slices;
- var x = 0;
- var y = 0;
- if (effect) {
- if (effect.name === 'banner') {
- if (alignment <= 3) { y = this.height - height - margin.vertical; }
- if (alignment >= 4 && alignment <= 6) { y = (this.height - height) / 2; }
- if (alignment >= 7) { y = margin.vertical; }
- x = effect.lefttoright ? -width : this.width;
- }
- } else if (dialogue.pos || move) {
- var pos = dialogue.pos || { x: 0, y: 0 };
- if (alignment % 3 === 1) { x = this.scale * pos.x; }
- if (alignment % 3 === 2) { x = this.scale * pos.x - width / 2; }
- if (alignment % 3 === 0) { x = this.scale * pos.x - width; }
- if (alignment <= 3) { y = this.scale * pos.y - height; }
- if (alignment >= 4 && alignment <= 6) { y = this.scale * pos.y - height / 2; }
- if (alignment >= 7) { y = this.scale * pos.y; }
- } else {
- if (alignment % 3 === 1) { x = 0; }
- if (alignment % 3 === 2) { x = (this.width - width) / 2; }
- if (alignment % 3 === 0) { x = this.width - width - this.scale * margin.right; }
- var hasT = slices.some(function (slice) { return (
- slice.fragments.some(function (ref) {
- var animationName = ref.animationName;
-
- return animationName;
- })
- ); });
- if (hasT) {
- if (alignment <= 3) { y = this.height - height - margin.vertical; }
- if (alignment >= 4 && alignment <= 6) { y = (this.height - height) / 2; }
- if (alignment >= 7) { y = margin.vertical; }
- } else {
- y = allocate.call(this, dialogue);
- }
- }
- return { x: x, y: y };
- }
-
- function createStyle(dialogue) {
- var layer = dialogue.layer;
- var start = dialogue.start;
- var end = dialogue.end;
- var alignment = dialogue.alignment;
- var effect = dialogue.effect;
- var pos = dialogue.pos;
- var margin = dialogue.margin;
- var animationName = dialogue.animationName;
- var width = dialogue.width;
- var height = dialogue.height;
- var x = dialogue.x;
- var y = dialogue.y;
- var vct = this.video.currentTime;
- var cssText = '';
- if (layer) { cssText += "z-index:" + layer + ";"; }
- if (animationName) {
- cssText += createAnimation(animationName, end - start, Math.min(0, start - vct));
- }
- cssText += "text-align:" + (['right', 'left', 'center'][alignment % 3]) + ";";
- if (!effect) {
- var mw = this.width - this.scale * (margin.left + margin.right);
- cssText += "max-width:" + mw + "px;";
- if (!pos) {
- if (alignment % 3 === 1) {
- cssText += "margin-left:" + (this.scale * margin.left) + "px;";
- }
- if (alignment % 3 === 0) {
- cssText += "margin-right:" + (this.scale * margin.right) + "px;";
- }
- if (width > this.width - this.scale * (margin.left + margin.right)) {
- cssText += "margin-left:" + (this.scale * margin.left) + "px;";
- cssText += "margin-right:" + (this.scale * margin.right) + "px;";
- }
- }
- }
- cssText += "width:" + width + "px;height:" + height + "px;left:" + x + "px;top:" + y + "px;";
- return cssText;
- }
-
- function renderer(dialogue) {
- var $div = createDialogue.call(this, dialogue);
- assign(dialogue, { $div: $div });
- this._.$stage.appendChild($div);
- var ref = $div.getBoundingClientRect();
- var width = ref.width;
- var height = ref.height;
- assign(dialogue, { width: width, height: height });
- assign(dialogue, getPosition.call(this, dialogue));
- $div.style.cssText = createStyle.call(this, dialogue);
- setTransformOrigin(dialogue);
- setClipPath.call(this, dialogue);
- return dialogue;
- }
-
- function framing() {
- var vct = this.video.currentTime;
- for (var i = this._.stagings.length - 1; i >= 0; i--) {
- var dia = this._.stagings[i];
- var end = dia.end;
- if (dia.effect && /scroll/.test(dia.effect.name)) {
- var ref = dia.effect;
- var y1 = ref.y1;
- var y2 = ref.y2;
- var delay = ref.delay;
- var duration = ((y2 || this._.resampledRes.height) - y1) / (1000 / delay);
- end = Math.min(end, dia.start + duration);
- }
- if (end < vct) {
- this._.$stage.removeChild(dia.$div);
- if (dia.$clipPath) {
- this._.$defs.removeChild(dia.$clipPath);
- }
- this._.stagings.splice(i, 1);
- }
- }
- var dias = this.dialogues;
- while (
- this._.index < dias.length
- && vct >= dias[this._.index].start
- ) {
- if (vct < dias[this._.index].end) {
- var dia$1 = renderer.call(this, dias[this._.index]);
- this._.stagings.push(dia$1);
- }
- ++this._.index;
- }
- }
-
- function play() {
- var this$1 = this;
-
- var frame = function () {
- framing.call(this$1);
- this$1._.requestId = raf(frame);
- };
- caf(this._.requestId);
- this._.requestId = raf(frame);
- this._.$stage.classList.remove('ASS-animation-paused');
- return this;
- }
-
- function pause() {
- caf(this._.requestId);
- this._.requestId = 0;
- this._.$stage.classList.add('ASS-animation-paused');
- return this;
- }
-
- function clear() {
- while (this._.$stage.lastChild) {
- this._.$stage.removeChild(this._.$stage.lastChild);
- }
- while (this._.$defs.lastChild) {
- this._.$defs.removeChild(this._.$defs.lastChild);
- }
- this._.stagings = [];
- this._.space = [];
- }
-
- function seek() {
- var vct = this.video.currentTime;
- var dias = this.dialogues;
- clear.call(this);
- this._.index = (function () {
- var from = 0;
- var to = dias.length - 1;
- while (from + 1 < to && vct > dias[(to + from) >> 1].end) {
- from = (to + from) >> 1;
- }
- if (!from) { return 0; }
- for (var i = from; i < to; i++) {
- if (
- dias[i].end > vct && vct >= dias[i].start
- || (i && dias[i - 1].end < vct && vct < dias[i].start)
- ) {
- return i;
- }
- }
- return to;
- })();
- framing.call(this);
- }
-
- function bindEvents() {
- var l = this._.listener;
- l.play = play.bind(this);
- l.pause = pause.bind(this);
- l.seeking = seek.bind(this);
- this.video.addEventListener('play', l.play);
- this.video.addEventListener('pause', l.pause);
- this.video.addEventListener('seeking', l.seeking);
- }
-
- function unbindEvents() {
- var l = this._.listener;
- this.video.removeEventListener('play', l.play);
- this.video.removeEventListener('pause', l.pause);
- this.video.removeEventListener('seeking', l.seeking);
- l.play = null;
- l.pause = null;
- l.seeking = null;
- }
-
- function resize() {
- var cw = this.video.clientWidth;
- var ch = this.video.clientHeight;
- var vw = this.video.videoWidth || cw;
- var vh = this.video.videoHeight || ch;
- var sw = this._.scriptRes.width;
- var sh = this._.scriptRes.height;
- var rw = sw;
- var rh = sh;
- var videoScale = Math.min(cw / vw, ch / vh);
- if (this.resampling === 'video_width') {
- rh = sw / vw * vh;
- }
- if (this.resampling === 'video_height') {
- rw = sh / vh * vw;
- }
- this.scale = Math.min(cw / rw, ch / rh);
- if (this.resampling === 'script_width') {
- this.scale = videoScale * (vw / rw);
- }
- if (this.resampling === 'script_height') {
- this.scale = videoScale * (vh / rh);
- }
- this.width = this.scale * rw;
- this.height = this.scale * rh;
- this._.resampledRes = { width: rw, height: rh };
-
- this.container.style.cssText = "width:" + cw + "px;height:" + ch + "px;";
- var cssText = (
- "width:" + (this.width) + "px;"
- + "height:" + (this.height) + "px;"
- + "top:" + ((ch - this.height) / 2) + "px;"
- + "left:" + ((cw - this.width) / 2) + "px;"
- );
- this._.$stage.style.cssText = cssText;
- this._.$svg.style.cssText = cssText;
- this._.$svg.setAttributeNS(null, 'viewBox', ("0 0 " + sw + " " + sh));
-
- this._.$animation.innerHTML = getKeyframes.call(this);
- seek.call(this);
-
- return this;
- }
-
- var GLOBAL_CSS = '.ASS-container,.ASS-stage{position:relative;overflow:hidden}.ASS-container video{position:absolute;top:0;left:0}.ASS-stage{pointer-events:none;position:absolute}.ASS-dialogue{font-size:0;position:absolute}.ASS-fix-font-size{position:absolute;visibility:hidden}.ASS-fix-objectBoundingBox{width:100%;height:100%;position:absolute;top:0;left:0}.ASS-animation-paused *{-webkit-animation-play-state:paused!important;animation-play-state:paused!important}';
-
- function init(source, video, options) {
- if ( options === void 0 ) options = {};
-
- this.scale = 1;
-
- // private variables
- this._ = {
- index: 0,
- stagings: [],
- space: [],
- listener: {},
- $svg: createSVGEl('svg'),
- $defs: createSVGEl('defs'),
- $stage: document.createElement('div'),
- $animation: document.createElement('style'),
- };
- this._.$svg.appendChild(this._.$defs);
- this._.$stage.className = 'ASS-stage ASS-animation-paused';
-
- this._.resampling = options.resampling || 'video_height';
-
- this.container = options.container || document.createElement('div');
- this.container.classList.add('ASS-container');
- this.container.appendChild($fixFontSize);
- this.container.appendChild(this._.$svg);
- this._.hasInitContainer = !!options.container;
-
- this.video = video;
- bindEvents.call(this);
- if (!this._.hasInitContainer) {
- var isPlaying = !video.paused;
- video.parentNode.insertBefore(this.container, video);
- this.container.appendChild(video);
- if (isPlaying && video.paused) {
- video.play();
- }
- }
- this.container.appendChild(this._.$stage);
-
- var ref = compile(source);
- var info = ref.info;
- var width = ref.width;
- var height = ref.height;
- var dialogues = ref.dialogues;
- this.info = info;
- this._.scriptRes = {
- width: width || video.videoWidth,
- height: height || video.videoHeight,
- };
- this.dialogues = dialogues;
-
- var styleRoot = getStyleRoot(this.container);
- var $style = styleRoot.querySelector('#ASS-global-style');
- if (!$style) {
- $style = document.createElement('style');
- $style.type = 'text/css';
- $style.id = 'ASS-global-style';
- $style.appendChild(document.createTextNode(GLOBAL_CSS));
- styleRoot.appendChild($style);
- }
- this._.$animation.type = 'text/css';
- this._.$animation.className = 'ASS-animation';
- styleRoot.appendChild(this._.$animation);
-
- resize.call(this);
-
- if (!this.video.paused) {
- seek.call(this);
- play.call(this);
- }
-
- return this;
- }
-
- function show() {
- this._.$stage.style.visibility = 'visible';
- return this;
- }
-
- function hide() {
- this._.$stage.style.visibility = 'hidden';
- return this;
- }
-
- function destroy() {
- pause.call(this);
- clear.call(this);
- unbindEvents.call(this, this._.listener);
-
- var styleRoot = getStyleRoot(this.container);
- if (!this._.hasInitContainer) {
- var isPlay = !this.video.paused;
- this.container.parentNode.insertBefore(this.video, this.container);
- this.container.parentNode.removeChild(this.container);
- if (isPlay && this.video.paused) {
- this.video.play();
- }
- }
- styleRoot.removeChild(this._.$animation);
-
- // eslint-disable-next-line no-restricted-syntax
- for (var key in this) {
- if (Object.prototype.hasOwnProperty.call(this, key)) {
- this[key] = null;
- }
- }
-
- return this;
- }
-
- var regex = /^(video|script)_(width|height)$/;
-
- function getter() {
- return regex.test(this._.resampling) ? this._.resampling : 'video_height';
- }
-
- function setter(r) {
- if (r === this._.resampling) { return r; }
- if (regex.test(r)) {
- this._.resampling = r;
- this.resize();
- }
- return this._.resampling;
- }
-
- var ASS = function ASS(source, video, options) {
- if (typeof source !== 'string') {
- return this;
- }
- return init.call(this, source, video, options);
- };
-
- var prototypeAccessors = { resampling: { configurable: true } };
-
- ASS.prototype.resize = function resize$1 () {
- return resize.call(this);
- };
-
- ASS.prototype.show = function show$1 () {
- return show.call(this);
- };
-
- ASS.prototype.hide = function hide$1 () {
- return hide.call(this);
- };
-
- ASS.prototype.destroy = function destroy$1 () {
- return destroy.call(this);
- };
-
- prototypeAccessors.resampling.get = function () {
- return getter.call(this);
- };
-
- prototypeAccessors.resampling.set = function (r) {
- return setter.call(this, r);
- };
-
- Object.defineProperties( ASS.prototype, prototypeAccessors );
-
- function styleInject(css, ref) {
- if ( ref === void 0 ) ref = {};
- var insertAt = ref.insertAt;
-
- if (!css || typeof document === 'undefined') { return; }
-
- var head = document.head || document.getElementsByTagName('head')[0];
- var style = document.createElement('style');
- style.type = 'text/css';
-
- if (insertAt === 'top') {
- if (head.firstChild) {
- head.insertBefore(style, head.firstChild);
- } else {
- head.appendChild(style);
- }
- } else {
- head.appendChild(style);
- }
-
- if (style.styleSheet) {
- style.styleSheet.cssText = css;
- } else {
- style.appendChild(document.createTextNode(css));
- }
- }
-
- var css_248z = ".artplayer-plugin-ass{bottom:0!important}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsc0JBQ0Usa0JBQXNCIiwiZmlsZSI6InN0eWxlLnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuYXJ0cGxheWVyLXBsdWdpbi1hc3Mge1xuICBib3R0b206IDAgIWltcG9ydGFudDsgfVxuIl19 */";
- styleInject(css_248z);
-
- function artplayerPluginAss(url) {
- return function (art) {
- var ass = null;
- fetch(url).then(function (res) {
- return res.text();
- }).then(function (text) {
- var _art$template = art.template,
- $video = _art$template.$video,
- $subtitle = _art$template.$subtitle;
- $subtitle.classList.add('artplayer-plugin-ass');
- art.once('ready', function () {
- ass = new ASS(text, $video, {
- container: $subtitle,
- resampling: 'video_width'
- });
- ass.resize();
- art.emit('artplayerPluginAss', ass);
- art.on('resize', function () {
- return ass.resize();
- });
- art.on('destroy', function () {
- return ass.destroy();
- });
- });
- });
- return {
- name: 'artplayerPluginAss',
- ass: ass
- };
- };
- }
-
- return artplayerPluginAss;
-
-})));
-//# sourceMappingURL=artplayer-plugin-ass.js.map
diff --git a/docs/uncompiled/artplayer-plugin-ass.js.map b/docs/uncompiled/artplayer-plugin-ass.js.map
deleted file mode 100644
index 864c4aac5..000000000
--- a/docs/uncompiled/artplayer-plugin-ass.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"artplayer-plugin-ass.js","sources":["../../packages/artplayer-plugin-ass/node_modules/_assjs@0.0.11@assjs/dist/ass.esm.js","../../node_modules/_style-inject@0.3.0@style-inject/dist/style-inject.es.js","../../packages/artplayer-plugin-ass/src/index.js"],"sourcesContent":["function parseEffect(text) {\n var param = text\n .toLowerCase()\n .trim()\n .split(/\\s*;\\s*/);\n if (param[0] === 'banner') {\n return {\n name: param[0],\n delay: param[1] * 1 || 0,\n leftToRight: param[2] * 1 || 0,\n fadeAwayWidth: param[3] * 1 || 0,\n };\n }\n if (/^scroll\\s/.test(param[0])) {\n return {\n name: param[0],\n y1: Math.min(param[1] * 1, param[2] * 1),\n y2: Math.max(param[1] * 1, param[2] * 1),\n delay: param[3] * 1 || 0,\n fadeAwayHeight: param[4] * 1 || 0,\n };\n }\n return null;\n}\n\nfunction parseDrawing(text) {\n return text\n .toLowerCase()\n // numbers\n .replace(/([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?)/g, ' $1 ')\n // commands\n .replace(/([mnlbspc])/g, ' $1 ')\n .trim()\n .replace(/\\s+/g, ' ')\n .split(/\\s(?=[mnlbspc])/)\n .map(function (cmd) { return (\n cmd.split(' ')\n .filter(function (x, i) { return !(i && Number.isNaN(x * 1)); })\n ); });\n}\n\nvar numTags = [\n 'b', 'i', 'u', 's', 'fsp',\n 'k', 'K', 'kf', 'ko', 'kt',\n 'fe', 'q', 'p', 'pbo', 'a', 'an',\n 'fscx', 'fscy', 'fax', 'fay', 'frx', 'fry', 'frz', 'fr',\n 'be', 'blur', 'bord', 'xbord', 'ybord', 'shad', 'xshad', 'yshad' ];\n\nvar numRegexs = numTags.map(function (nt) { return ({ name: nt, regex: new RegExp((\"^\" + nt + \"-?\\\\d\")) }); });\n\nfunction parseTag(text) {\n var assign;\n\n var tag = {};\n for (var i = 0; i < numRegexs.length; i++) {\n var ref = numRegexs[i];\n var name = ref.name;\n var regex = ref.regex;\n if (regex.test(text)) {\n tag[name] = text.slice(name.length) * 1;\n return tag;\n }\n }\n if (/^fn/.test(text)) {\n tag.fn = text.slice(2);\n } else if (/^r/.test(text)) {\n tag.r = text.slice(1);\n } else if (/^fs[\\d+-]/.test(text)) {\n tag.fs = text.slice(2);\n } else if (/^\\d?c&?H?[0-9a-f]+|^\\d?c$/i.test(text)) {\n var ref$1 = text.match(/^(\\d?)c&?H?(\\w*)/);\n var num = ref$1[1];\n var color = ref$1[2];\n tag[(\"c\" + (num || 1))] = color && (\"000000\" + color).slice(-6);\n } else if (/^\\da&?H?[0-9a-f]+/i.test(text)) {\n var ref$2 = text.match(/^(\\d)a&?H?(\\w\\w)/);\n var num$1 = ref$2[1];\n var alpha = ref$2[2];\n tag[(\"a\" + num$1)] = alpha;\n } else if (/^alpha&?H?[0-9a-f]+/i.test(text)) {\n (assign = text.match(/^alpha&?H?([0-9a-f]+)/i), tag.alpha = assign[1]);\n tag.alpha = (\"00\" + (tag.alpha)).slice(-2);\n } else if (/^(?:pos|org|move|fad|fade)\\(/.test(text)) {\n var ref$3 = text.match(/^(\\w+)\\((.*?)\\)?$/);\n var key = ref$3[1];\n var value = ref$3[2];\n tag[key] = value\n .trim()\n .split(/\\s*,\\s*/)\n .map(Number);\n } else if (/^i?clip/.test(text)) {\n var p = text\n .match(/^i?clip\\((.*?)\\)?$/)[1]\n .trim()\n .split(/\\s*,\\s*/);\n tag.clip = {\n inverse: /iclip/.test(text),\n scale: 1,\n drawing: null,\n dots: null,\n };\n if (p.length === 1) {\n tag.clip.drawing = parseDrawing(p[0]);\n }\n if (p.length === 2) {\n tag.clip.scale = p[0] * 1;\n tag.clip.drawing = parseDrawing(p[1]);\n }\n if (p.length === 4) {\n tag.clip.dots = p.map(Number);\n }\n } else if (/^t\\(/.test(text)) {\n var p$1 = text\n .match(/^t\\((.*?)\\)?$/)[1]\n .trim()\n .replace(/\\\\.*/, function (x) { return x.replace(/,/g, '\\n'); })\n .split(/\\s*,\\s*/);\n if (!p$1[0]) { return tag; }\n tag.t = {\n t1: 0,\n t2: 0,\n accel: 1,\n tags: p$1[p$1.length - 1]\n .replace(/\\n/g, ',')\n .split('\\\\')\n .slice(1)\n .map(parseTag),\n };\n if (p$1.length === 2) {\n tag.t.accel = p$1[0] * 1;\n }\n if (p$1.length === 3) {\n tag.t.t1 = p$1[0] * 1;\n tag.t.t2 = p$1[1] * 1;\n }\n if (p$1.length === 4) {\n tag.t.t1 = p$1[0] * 1;\n tag.t.t2 = p$1[1] * 1;\n tag.t.accel = p$1[2] * 1;\n }\n }\n\n return tag;\n}\n\nfunction parseTags(text) {\n var tags = [];\n var depth = 0;\n var str = '';\n for (var i = 0; i < text.length; i++) {\n var x = text[i];\n if (x === '(') { depth++; }\n if (x === ')') { depth--; }\n if (depth < 0) { depth = 0; }\n if (!depth && x === '\\\\') {\n if (str) {\n tags.push(str);\n }\n str = '';\n } else {\n str += x;\n }\n }\n tags.push(str);\n return tags.map(parseTag);\n}\n\nfunction parseText(text) {\n var pairs = text.split(/{([^{}]*?)}/);\n var parsed = [];\n if (pairs[0].length) {\n parsed.push({ tags: [], text: pairs[0], drawing: [] });\n }\n for (var i = 1; i < pairs.length; i += 2) {\n var tags = parseTags(pairs[i]);\n var isDrawing = tags.reduce(function (v, tag) { return (tag.p === undefined ? v : !!tag.p); }, false);\n parsed.push({\n tags: tags,\n text: isDrawing ? '' : pairs[i + 1],\n drawing: isDrawing ? parseDrawing(pairs[i + 1]) : [],\n });\n }\n return {\n raw: text,\n combined: parsed.map(function (frag) { return frag.text; }).join(''),\n parsed: parsed,\n };\n}\n\nfunction parseTime(time) {\n var t = time.split(':');\n return t[0] * 3600 + t[1] * 60 + t[2] * 1;\n}\n\nfunction parseDialogue(text, format) {\n var fields = text.split(',');\n if (fields.length > format.length) {\n var textField = fields.slice(format.length - 1).join();\n fields = fields.slice(0, format.length - 1);\n fields.push(textField);\n }\n\n var dia = {};\n for (var i = 0; i < fields.length; i++) {\n var fmt = format[i];\n var fld = fields[i].trim();\n switch (fmt) {\n case 'Layer':\n case 'MarginL':\n case 'MarginR':\n case 'MarginV':\n dia[fmt] = fld * 1;\n break;\n case 'Start':\n case 'End':\n dia[fmt] = parseTime(fld);\n break;\n case 'Effect':\n dia[fmt] = parseEffect(fld);\n break;\n case 'Text':\n dia[fmt] = parseText(fld);\n break;\n default:\n dia[fmt] = fld;\n }\n }\n\n return dia;\n}\n\nfunction parseFormat(text) {\n return text.match(/Format\\s*:\\s*(.*)/i)[1].split(/\\s*,\\s*/);\n}\n\nfunction parseStyle(text) {\n return text.match(/Style\\s*:\\s*(.*)/i)[1].split(/\\s*,\\s*/);\n}\n\nfunction parse(text) {\n var tree = {\n info: {},\n styles: { format: [], style: [] },\n events: { format: [], comment: [], dialogue: [] },\n };\n var lines = text.split(/\\r?\\n/);\n var state = 0;\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i].trim();\n if (/^;/.test(line)) { continue; }\n\n if (/^\\[Script Info\\]/i.test(line)) { state = 1; }\n else if (/^\\[V4\\+? Styles\\]/i.test(line)) { state = 2; }\n else if (/^\\[Events\\]/i.test(line)) { state = 3; }\n else if (/^\\[.*\\]/.test(line)) { state = 0; }\n\n if (state === 0) { continue; }\n if (state === 1) {\n if (/:/.test(line)) {\n var ref = line.match(/(.*?)\\s*:\\s*(.*)/);\n var key = ref[1];\n var value = ref[2];\n tree.info[key] = value;\n }\n }\n if (state === 2) {\n if (/^Format\\s*:/i.test(line)) {\n tree.styles.format = parseFormat(line);\n }\n if (/^Style\\s*:/i.test(line)) {\n tree.styles.style.push(parseStyle(line));\n }\n }\n if (state === 3) {\n if (/^Format\\s*:/i.test(line)) {\n tree.events.format = parseFormat(line);\n }\n if (/^(?:Comment|Dialogue)\\s*:/i.test(line)) {\n var ref$1 = line.match(/^(\\w+?)\\s*:\\s*(.*)/i);\n var key$1 = ref$1[1];\n var value$1 = ref$1[2];\n tree.events[key$1.toLowerCase()].push(parseDialogue(value$1, tree.events.format));\n }\n }\n }\n\n return tree;\n}\n\nvar assign = Object.assign || (\n /* istanbul ignore next */\n function assign(target) {\n var sources = [], len = arguments.length - 1;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n for (var i = 0; i < sources.length; i++) {\n if (!sources[i]) { continue; }\n var keys = Object.keys(sources[i]);\n for (var j = 0; j < keys.length; j++) {\n // eslint-disable-next-line no-param-reassign\n target[keys[j]] = sources[i][keys[j]];\n }\n }\n return target;\n }\n);\n\nfunction createCommand(arr) {\n var cmd = {\n type: null,\n prev: null,\n next: null,\n points: [],\n };\n if (/[mnlbs]/.test(arr[0])) {\n cmd.type = arr[0]\n .toUpperCase()\n .replace('N', 'L')\n .replace('B', 'C');\n }\n for (var len = arr.length - !(arr.length & 1), i = 1; i < len; i += 2) {\n cmd.points.push({ x: arr[i] * 1, y: arr[i + 1] * 1 });\n }\n return cmd;\n}\n\nfunction isValid(cmd) {\n if (!cmd.points.length || !cmd.type) {\n return false;\n }\n if (/C|S/.test(cmd.type) && cmd.points.length < 3) {\n return false;\n }\n return true;\n}\n\nfunction getViewBox(commands) {\n var ref;\n\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n (ref = []).concat.apply(ref, commands.map(function (ref) {\n var points = ref.points;\n\n return points;\n })).forEach(function (ref) {\n var x = ref.x;\n var y = ref.y;\n\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n });\n return {\n minX: minX,\n minY: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n}\n\n/**\n * Convert S command to B command\n * Reference from https://github.com/d3/d3/blob/v3.5.17/src/svg/line.js#L259\n * @param {Array} points points\n * @param {String} prev type of previous command\n * @param {String} next type of next command\n * @return {Array} converted commands\n */\nfunction s2b(points, prev, next) {\n var results = [];\n var bb1 = [0, 2 / 3, 1 / 3, 0];\n var bb2 = [0, 1 / 3, 2 / 3, 0];\n var bb3 = [0, 1 / 6, 2 / 3, 1 / 6];\n var dot4 = function (a, b) { return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]); };\n var px = [points[points.length - 1].x, points[0].x, points[1].x, points[2].x];\n var py = [points[points.length - 1].y, points[0].y, points[1].y, points[2].y];\n results.push({\n type: prev === 'M' ? 'M' : 'L',\n points: [{ x: dot4(bb3, px), y: dot4(bb3, py) }],\n });\n for (var i = 3; i < points.length; i++) {\n px = [points[i - 3].x, points[i - 2].x, points[i - 1].x, points[i].x];\n py = [points[i - 3].y, points[i - 2].y, points[i - 1].y, points[i].y];\n results.push({\n type: 'C',\n points: [\n { x: dot4(bb1, px), y: dot4(bb1, py) },\n { x: dot4(bb2, px), y: dot4(bb2, py) },\n { x: dot4(bb3, px), y: dot4(bb3, py) } ],\n });\n }\n if (next === 'L' || next === 'C') {\n var last = points[points.length - 1];\n results.push({ type: 'L', points: [{ x: last.x, y: last.y }] });\n }\n return results;\n}\n\nfunction toSVGPath(instructions) {\n return instructions.map(function (ref) {\n var type = ref.type;\n var points = ref.points;\n\n return (\n type + points.map(function (ref) {\n var x = ref.x;\n var y = ref.y;\n\n return (x + \",\" + y);\n }).join(',')\n );\n }).join('');\n}\n\nfunction compileDrawing(rawCommands) {\n var ref$1;\n\n var commands = [];\n var i = 0;\n while (i < rawCommands.length) {\n var arr = rawCommands[i];\n var cmd = createCommand(arr);\n if (isValid(cmd)) {\n if (cmd.type === 'S') {\n var ref = (commands[i - 1] || { points: [{ x: 0, y: 0 }] }).points.slice(-1)[0];\n var x = ref.x;\n var y = ref.y;\n cmd.points.unshift({ x: x, y: y });\n }\n if (i) {\n cmd.prev = commands[i - 1].type;\n commands[i - 1].next = cmd.type;\n }\n commands.push(cmd);\n i++;\n } else {\n if (i && commands[i - 1].type === 'S') {\n var additionPoints = {\n p: cmd.points,\n c: commands[i - 1].points.slice(0, 3),\n };\n commands[i - 1].points = commands[i - 1].points.concat(\n (additionPoints[arr[0]] || []).map(function (ref) {\n var x = ref.x;\n var y = ref.y;\n\n return ({ x: x, y: y });\n })\n );\n }\n rawCommands.splice(i, 1);\n }\n }\n var instructions = (ref$1 = []).concat.apply(\n ref$1, commands.map(function (ref) {\n var type = ref.type;\n var points = ref.points;\n var prev = ref.prev;\n var next = ref.next;\n\n return (\n type === 'S'\n ? s2b(points, prev, next)\n : { type: type, points: points }\n );\n })\n );\n\n return assign({ instructions: instructions, d: toSVGPath(instructions) }, getViewBox(commands));\n}\n\nvar tTags = [\n 'fs', 'clip',\n 'c1', 'c2', 'c3', 'c4', 'a1', 'a2', 'a3', 'a4', 'alpha',\n 'fscx', 'fscy', 'fax', 'fay', 'frx', 'fry', 'frz', 'fr',\n 'be', 'blur', 'bord', 'xbord', 'ybord', 'shad', 'xshad', 'yshad' ];\n\nfunction compileTag(tag, key, presets) {\n var obj, obj$1, obj$2;\n\n if ( presets === void 0 ) presets = {};\n var value = tag[key];\n if (value === undefined) {\n return null;\n }\n if (key === 'pos' || key === 'org') {\n return value.length === 2 ? ( obj = {}, obj[key] = { x: value[0], y: value[1] }, obj ) : null;\n }\n if (key === 'move') {\n var x1 = value[0];\n var y1 = value[1];\n var x2 = value[2];\n var y2 = value[3];\n var t1 = value[4]; if ( t1 === void 0 ) t1 = 0;\n var t2 = value[5]; if ( t2 === void 0 ) t2 = 0;\n return value.length === 4 || value.length === 6\n ? { move: { x1: x1, y1: y1, x2: x2, y2: y2, t1: t1, t2: t2 } }\n : null;\n }\n if (key === 'fad' || key === 'fade') {\n if (value.length === 2) {\n var t1$1 = value[0];\n var t2$1 = value[1];\n return { fade: { type: 'fad', t1: t1$1, t2: t2$1 } };\n }\n if (value.length === 7) {\n var a1 = value[0];\n var a2 = value[1];\n var a3 = value[2];\n var t1$2 = value[3];\n var t2$2 = value[4];\n var t3 = value[5];\n var t4 = value[6];\n return { fade: { type: 'fade', a1: a1, a2: a2, a3: a3, t1: t1$2, t2: t2$2, t3: t3, t4: t4 } };\n }\n return null;\n }\n if (key === 'clip') {\n var inverse = value.inverse;\n var scale = value.scale;\n var drawing = value.drawing;\n var dots = value.dots;\n if (drawing) {\n return { clip: { inverse: inverse, scale: scale, drawing: compileDrawing(drawing), dots: dots } };\n }\n if (dots) {\n var x1$1 = dots[0];\n var y1$1 = dots[1];\n var x2$1 = dots[2];\n var y2$1 = dots[3];\n return { clip: { inverse: inverse, scale: scale, drawing: drawing, dots: { x1: x1$1, y1: y1$1, x2: x2$1, y2: y2$1 } } };\n }\n return null;\n }\n if (/^[xy]?(bord|shad)$/.test(key)) {\n value = Math.max(value, 0);\n }\n if (key === 'bord') {\n return { xbord: value, ybord: value };\n }\n if (key === 'shad') {\n return { xshad: value, yshad: value };\n }\n if (/^c\\d$/.test(key)) {\n return ( obj$1 = {}, obj$1[key] = value || presets[key], obj$1 );\n }\n if (key === 'alpha') {\n return { a1: value, a2: value, a3: value, a4: value };\n }\n if (key === 'fr') {\n return { frz: value };\n }\n if (key === 'fs') {\n return {\n fs: /^\\+|-/.test(value)\n ? (value * 1 > -10 ? (1 + value / 10) : 1) * presets.fs\n : value * 1,\n };\n }\n if (key === 't') {\n var t1$3 = value.t1;\n var accel = value.accel;\n var tags = value.tags;\n var t2$3 = value.t2 || (presets.end - presets.start) * 1e3;\n var compiledTag = {};\n tags.forEach(function (t) {\n var k = Object.keys(t)[0];\n if (~tTags.indexOf(k) && !(k === 'clip' && !t[k].dots)) {\n assign(compiledTag, compileTag(t, k, presets));\n }\n });\n return { t: { t1: t1$3, t2: t2$3, accel: accel, tag: compiledTag } };\n }\n return ( obj$2 = {}, obj$2[key] = value, obj$2 );\n}\n\nvar a2an = [\n null, 1, 2, 3,\n null, 7, 8, 9,\n null, 4, 5, 6 ];\n\nvar globalTags = ['r', 'a', 'an', 'pos', 'org', 'move', 'fade', 'fad', 'clip'];\n\nfunction createSlice(name, styles) {\n return {\n name: name,\n borderStyle: styles[name].style.BorderStyle,\n tag: styles[name].tag,\n fragments: [],\n };\n}\n\nfunction compileText(ref) {\n var styles = ref.styles;\n var name = ref.name;\n var parsed = ref.parsed;\n var start = ref.start;\n var end = ref.end;\n\n var alignment;\n var pos;\n var org;\n var move;\n var fade;\n var clip;\n var slices = [];\n var slice = createSlice(name, styles);\n var prevTag = {};\n for (var i = 0; i < parsed.length; i++) {\n var ref$1 = parsed[i];\n var tags = ref$1.tags;\n var text = ref$1.text;\n var drawing = ref$1.drawing;\n var reset = (void 0);\n for (var j = 0; j < tags.length; j++) {\n var tag = tags[j];\n reset = tag.r === undefined ? reset : tag.r;\n }\n var fragment = {\n tag: reset === undefined ? JSON.parse(JSON.stringify(prevTag)) : {},\n text: text,\n drawing: drawing.length ? compileDrawing(drawing) : null,\n };\n for (var j$1 = 0; j$1 < tags.length; j$1++) {\n var tag$1 = tags[j$1];\n alignment = alignment || a2an[tag$1.a || 0] || tag$1.an;\n pos = pos || compileTag(tag$1, 'pos');\n org = org || compileTag(tag$1, 'org');\n move = move || compileTag(tag$1, 'move');\n fade = fade || compileTag(tag$1, 'fade') || compileTag(tag$1, 'fad');\n clip = compileTag(tag$1, 'clip') || clip;\n var key = Object.keys(tag$1)[0];\n if (key && !~globalTags.indexOf(key)) {\n var ref$2 = slice.tag;\n var c1 = ref$2.c1;\n var c2 = ref$2.c2;\n var c3 = ref$2.c3;\n var c4 = ref$2.c4;\n var fs = prevTag.fs || slice.tag.fs;\n var compiledTag = compileTag(tag$1, key, { start: start, end: end, c1: c1, c2: c2, c3: c3, c4: c4, fs: fs });\n if (key === 't') {\n fragment.tag.t = fragment.tag.t || [];\n fragment.tag.t.push(compiledTag.t);\n } else {\n assign(fragment.tag, compiledTag);\n }\n }\n }\n prevTag = fragment.tag;\n if (reset !== undefined) {\n slices.push(slice);\n slice = createSlice(styles[reset] ? reset : name, styles);\n }\n if (fragment.text || fragment.drawing) {\n var prev = slice.fragments[slice.fragments.length - 1] || {};\n if (prev.text && fragment.text && !Object.keys(fragment.tag).length) {\n // merge fragment to previous if its tag is empty\n prev.text += fragment.text;\n } else {\n slice.fragments.push(fragment);\n }\n }\n }\n slices.push(slice);\n\n return assign({ alignment: alignment, slices: slices }, pos, org, move, fade, clip);\n}\n\nfunction compileDialogues(ref) {\n var styles = ref.styles;\n var dialogues = ref.dialogues;\n\n var minLayer = Infinity;\n var results = [];\n for (var i = 0; i < dialogues.length; i++) {\n var dia = dialogues[i];\n if (dia.Start >= dia.End) {\n continue;\n }\n if (!styles[dia.Style]) {\n dia.Style = 'Default';\n }\n var stl = styles[dia.Style].style;\n var compiledText = compileText({\n styles: styles,\n name: dia.Style,\n parsed: dia.Text.parsed,\n start: dia.Start,\n end: dia.End,\n });\n var alignment = compiledText.alignment || stl.Alignment;\n minLayer = Math.min(minLayer, dia.Layer);\n results.push(assign({\n layer: dia.Layer,\n start: dia.Start,\n end: dia.End,\n // reset style by `\\r` will not effect margin and alignment\n margin: {\n left: dia.MarginL || stl.MarginL,\n right: dia.MarginR || stl.MarginR,\n vertical: dia.MarginV || stl.MarginV,\n },\n effect: dia.Effect,\n }, compiledText, { alignment: alignment }));\n }\n for (var i$1 = 0; i$1 < results.length; i$1++) {\n results[i$1].layer -= minLayer;\n }\n return results.sort(function (a, b) { return a.start - b.start || a.end - b.end; });\n}\n\n// same as Aegisub\n// https://github.com/Aegisub/Aegisub/blob/master/src/ass_style.h\nvar DEFAULT_STYLE = {\n Name: 'Default',\n Fontname: 'Arial',\n Fontsize: '20',\n PrimaryColour: '&H00FFFFFF&',\n SecondaryColour: '&H000000FF&',\n OutlineColour: '&H00000000&',\n BackColour: '&H00000000&',\n Bold: '0',\n Italic: '0',\n Underline: '0',\n StrikeOut: '0',\n ScaleX: '100',\n ScaleY: '100',\n Spacing: '0',\n Angle: '0',\n BorderStyle: '1',\n Outline: '2',\n Shadow: '2',\n Alignment: '2',\n MarginL: '10',\n MarginR: '10',\n MarginV: '10',\n Encoding: '1',\n};\n\n/**\n * @param {String} color\n * @returns {Array} [AA, BBGGRR]\n */\nfunction parseStyleColor(color) {\n if (/^(&|H|&H)[0-9a-f]{6,}/i.test(color)) {\n var ref = color.match(/&?H?([0-9a-f]{2})?([0-9a-f]{6})/i);\n var a = ref[1];\n var c = ref[2];\n return [a || '00', c];\n }\n var num = parseInt(color, 10);\n if (!Number.isNaN(num)) {\n var min = -2147483648;\n var max = 2147483647;\n if (num < min) {\n return ['00', '000000'];\n }\n var aabbggrr = (min <= num && num <= max)\n ? (\"00000000\" + ((num < 0 ? num + 4294967296 : num).toString(16))).slice(-8)\n : String(num).slice(0, 8);\n return [aabbggrr.slice(0, 2), aabbggrr.slice(2)];\n }\n return ['00', '000000'];\n}\n\nfunction compileStyles(ref) {\n var info = ref.info;\n var style = ref.style;\n var format = ref.format;\n var defaultStyle = ref.defaultStyle;\n\n var result = {};\n var styles = [\n assign({}, DEFAULT_STYLE, defaultStyle, { Name: 'Default' }) ].concat( style.map(function (stl) {\n var s = {};\n for (var i = 0; i < format.length; i++) {\n s[format[i]] = stl[i];\n }\n return s;\n }) );\n var loop = function ( i ) {\n var s = styles[i];\n // this behavior is same as Aegisub by black-box testing\n if (/^(\\*+)Default$/.test(s.Name)) {\n s.Name = 'Default';\n }\n Object.keys(s).forEach(function (key) {\n if (key !== 'Name' && key !== 'Fontname' && !/Colour/.test(key)) {\n s[key] *= 1;\n }\n });\n var ref$1 = parseStyleColor(s.PrimaryColour);\n var a1 = ref$1[0];\n var c1 = ref$1[1];\n var ref$2 = parseStyleColor(s.SecondaryColour);\n var a2 = ref$2[0];\n var c2 = ref$2[1];\n var ref$3 = parseStyleColor(s.OutlineColour);\n var a3 = ref$3[0];\n var c3 = ref$3[1];\n var ref$4 = parseStyleColor(s.BackColour);\n var a4 = ref$4[0];\n var c4 = ref$4[1];\n var tag = {\n fn: s.Fontname,\n fs: s.Fontsize,\n c1: c1,\n a1: a1,\n c2: c2,\n a2: a2,\n c3: c3,\n a3: a3,\n c4: c4,\n a4: a4,\n b: Math.abs(s.Bold),\n i: Math.abs(s.Italic),\n u: Math.abs(s.Underline),\n s: Math.abs(s.StrikeOut),\n fscx: s.ScaleX,\n fscy: s.ScaleY,\n fsp: s.Spacing,\n frz: s.Angle,\n xbord: s.Outline,\n ybord: s.Outline,\n xshad: s.Shadow,\n yshad: s.Shadow,\n q: /^[0-3]$/.test(info.WrapStyle) ? info.WrapStyle * 1 : 2,\n };\n result[s.Name] = { style: s, tag: tag };\n };\n\n for (var i = 0; i < styles.length; i++) loop( i );\n return result;\n}\n\nfunction compile(text, options) {\n if ( options === void 0 ) options = {};\n\n var tree = parse(text);\n var styles = compileStyles({\n info: tree.info,\n style: tree.styles.style,\n format: tree.styles.format,\n defaultStyle: options.defaultStyle || {},\n });\n return {\n info: tree.info,\n width: tree.info.PlayResX * 1 || null,\n height: tree.info.PlayResY * 1 || null,\n collisions: tree.info.Collisions || 'Normal',\n styles: styles,\n dialogues: compileDialogues({\n styles: styles,\n dialogues: tree.events.dialogue,\n }),\n };\n}\n\nvar raf = (\n window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || (function (cb) { return setTimeout(cb, 50 / 3); })\n);\n\nvar caf = (\n window.cancelAnimationFrame\n || window.mozCancelAnimationFrame\n || window.webkitCancelAnimationFrame\n || clearTimeout\n);\n\nfunction color2rgba(c) {\n var t = c.match(/(\\w\\w)(\\w\\w)(\\w\\w)(\\w\\w)/);\n var a = 1 - (\"0x\" + (t[1])) / 255;\n var b = +(\"0x\" + (t[2]));\n var g = +(\"0x\" + (t[3]));\n var r = +(\"0x\" + (t[4]));\n return (\"rgba(\" + r + \",\" + g + \",\" + b + \",\" + a + \")\");\n}\n\nfunction uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c === 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\n\nfunction createSVGEl(name, attrs) {\n if ( attrs === void 0 ) attrs = [];\n\n var $el = document.createElementNS('http://www.w3.org/2000/svg', name);\n for (var i = 0; i < attrs.length; i++) {\n var attr = attrs[i];\n $el.setAttributeNS(\n attr[0] === 'xlink:href' ? 'http://www.w3.org/1999/xlink' : null,\n attr[0],\n attr[1]\n );\n }\n return $el;\n}\n\nfunction getVendor(prop) {\n var ref = document.body;\n var style = ref.style;\n var Prop = prop.replace(/^\\w/, function (x) { return x.toUpperCase(); });\n if (prop in style) { return ''; }\n if ((\"webkit\" + Prop) in style) { return '-webkit-'; }\n if ((\"moz\" + Prop) in style) { return '-moz-'; }\n return '';\n}\n\nvar vendor = {\n transform: getVendor('transform'),\n animation: getVendor('animation'),\n clipPath: getVendor('clipPath'),\n};\n\nfunction getStyleRoot(container) {\n var rootNode = container.getRootNode ? container.getRootNode() : document;\n return rootNode === document ? rootNode.head : rootNode;\n}\n\nvar strokeTags = ['c3', 'a3', 'c4', 'a4', 'xbord', 'ybord', 'xshad', 'yshad', 'blur', 'be'];\nvar transformTags = ['fscx', 'fscy', 'frx', 'fry', 'frz', 'fax', 'fay'];\n\nfunction createClipPath(clip) {\n var sw = this._.scriptRes.width;\n var sh = this._.scriptRes.height;\n var d = '';\n if (clip.dots !== null) {\n var ref = clip.dots;\n var x1 = ref.x1;\n var y1 = ref.y1;\n var x2 = ref.x2;\n var y2 = ref.y2;\n x1 /= sw;\n y1 /= sh;\n x2 /= sw;\n y2 /= sh;\n d = \"M\" + x1 + \",\" + y1 + \"L\" + x1 + \",\" + y2 + \",\" + x2 + \",\" + y2 + \",\" + x2 + \",\" + y1 + \"Z\";\n }\n if (clip.drawing !== null) {\n d = clip.drawing.instructions.map(function (ref) {\n var type = ref.type;\n var points = ref.points;\n\n return (\n type + points.map(function (ref) {\n var x = ref.x;\n var y = ref.y;\n\n return ((x / sw) + \",\" + (y / sh));\n }).join(',')\n );\n }).join('');\n }\n var scale = 1 / (1 << (clip.scale - 1));\n if (clip.inverse) {\n d += \"M0,0L0,\" + scale + \",\" + scale + \",\" + scale + \",\" + scale + \",0,0,0Z\";\n }\n var id = \"ASS-\" + (uuid());\n var $clipPath = createSVGEl('clipPath', [\n ['id', id],\n ['clipPathUnits', 'objectBoundingBox'] ]);\n $clipPath.appendChild(createSVGEl('path', [\n ['d', d],\n ['transform', (\"scale(\" + scale + \")\")],\n ['clip-rule', 'evenodd'] ]));\n this._.$defs.appendChild($clipPath);\n return {\n $clipPath: $clipPath,\n cssText: ((vendor.clipPath) + \"clip-path:url(#\" + id + \");\"),\n };\n}\n\nfunction setClipPath(dialogue) {\n if (!dialogue.clip) {\n return;\n }\n var $fobb = document.createElement('div');\n this._.$stage.insertBefore($fobb, dialogue.$div);\n $fobb.appendChild(dialogue.$div);\n $fobb.className = 'ASS-fix-objectBoundingBox';\n var ref = createClipPath.call(this, dialogue.clip);\n var cssText = ref.cssText;\n var $clipPath = ref.$clipPath;\n this._.$defs.appendChild($clipPath);\n $fobb.style.cssText = cssText;\n assign(dialogue, { $div: $fobb, $clipPath: $clipPath });\n}\n\nvar $fixFontSize = document.createElement('div');\n$fixFontSize.className = 'ASS-fix-font-size';\n$fixFontSize.textContent = 'M';\n\nvar cache = Object.create(null);\n\nfunction getRealFontSize(fn, fs) {\n var key = fn + \"-\" + fs;\n if (!cache[key]) {\n $fixFontSize.style.cssText = \"line-height:normal;font-size:\" + fs + \"px;font-family:\\\"\" + fn + \"\\\",Arial;\";\n cache[key] = fs * fs / $fixFontSize.clientHeight;\n }\n return cache[key];\n}\n\nfunction createSVGStroke(tag, id, scale) {\n var hasBorder = tag.xbord || tag.ybord;\n var hasShadow = tag.xshad || tag.yshad;\n var isOpaque = tag.a1 !== 'FF';\n var blur = tag.blur || tag.be || 0;\n var $filter = createSVGEl('filter', [['id', id]]);\n $filter.appendChild(createSVGEl('feGaussianBlur', [\n ['stdDeviation', hasBorder ? 0 : blur],\n ['in', 'SourceGraphic'],\n ['result', 'sg_b'] ]));\n $filter.appendChild(createSVGEl('feFlood', [\n ['flood-color', color2rgba(tag.a1 + tag.c1)],\n ['result', 'c1'] ]));\n $filter.appendChild(createSVGEl('feComposite', [\n ['operator', 'in'],\n ['in', 'c1'],\n ['in2', 'sg_b'],\n ['result', 'main'] ]));\n if (hasBorder) {\n $filter.appendChild(createSVGEl('feMorphology', [\n ['radius', ((tag.xbord * scale) + \" \" + (tag.ybord * scale))],\n ['operator', 'dilate'],\n ['in', 'SourceGraphic'],\n ['result', 'dil'] ]));\n $filter.appendChild(createSVGEl('feGaussianBlur', [\n ['stdDeviation', blur],\n ['in', 'dil'],\n ['result', 'dil_b'] ]));\n $filter.appendChild(createSVGEl('feComposite', [\n ['operator', 'out'],\n ['in', 'dil_b'],\n ['in2', 'SourceGraphic'],\n ['result', 'dil_b_o'] ]));\n $filter.appendChild(createSVGEl('feFlood', [\n ['flood-color', color2rgba(tag.a3 + tag.c3)],\n ['result', 'c3'] ]));\n $filter.appendChild(createSVGEl('feComposite', [\n ['operator', 'in'],\n ['in', 'c3'],\n ['in2', 'dil_b_o'],\n ['result', 'border'] ]));\n }\n if (hasShadow && (hasBorder || isOpaque)) {\n $filter.appendChild(createSVGEl('feOffset', [\n ['dx', tag.xshad * scale],\n ['dy', tag.yshad * scale],\n ['in', hasBorder ? 'dil' : 'SourceGraphic'],\n ['result', 'off'] ]));\n $filter.appendChild(createSVGEl('feGaussianBlur', [\n ['stdDeviation', blur],\n ['in', 'off'],\n ['result', 'off_b'] ]));\n if (!isOpaque) {\n $filter.appendChild(createSVGEl('feOffset', [\n ['dx', tag.xshad * scale],\n ['dy', tag.yshad * scale],\n ['in', 'SourceGraphic'],\n ['result', 'sg_off'] ]));\n $filter.appendChild(createSVGEl('feComposite', [\n ['operator', 'out'],\n ['in', 'off_b'],\n ['in2', 'sg_off'],\n ['result', 'off_b_o'] ]));\n }\n $filter.appendChild(createSVGEl('feFlood', [\n ['flood-color', color2rgba(tag.a4 + tag.c4)],\n ['result', 'c4'] ]));\n $filter.appendChild(createSVGEl('feComposite', [\n ['operator', 'in'],\n ['in', 'c4'],\n ['in2', isOpaque ? 'off_b' : 'off_b_o'],\n ['result', 'shadow'] ]));\n }\n var $merge = createSVGEl('feMerge', []);\n if (hasShadow && (hasBorder || isOpaque)) {\n $merge.appendChild(createSVGEl('feMergeNode', [['in', 'shadow']]));\n }\n if (hasBorder) {\n $merge.appendChild(createSVGEl('feMergeNode', [['in', 'border']]));\n }\n $merge.appendChild(createSVGEl('feMergeNode', [['in', 'main']]));\n $filter.appendChild($merge);\n return $filter;\n}\n\nfunction createCSSStroke(tag, scale) {\n var arr = [];\n var oc = color2rgba(tag.a3 + tag.c3);\n var ox = tag.xbord * scale;\n var oy = tag.ybord * scale;\n var sc = color2rgba(tag.a4 + tag.c4);\n var sx = tag.xshad * scale;\n var sy = tag.yshad * scale;\n var blur = tag.blur || tag.be || 0;\n if (!(ox + oy + sx + sy)) { return 'none'; }\n if (ox || oy) {\n for (var i = -1; i <= 1; i++) {\n for (var j = -1; j <= 1; j++) {\n for (var x = 1; x < ox; x++) {\n for (var y = 1; y < oy; y++) {\n if (i || j) {\n arr.push((oc + \" \" + (i * x) + \"px \" + (j * y) + \"px \" + blur + \"px\"));\n }\n }\n }\n arr.push((oc + \" \" + (i * ox) + \"px \" + (j * oy) + \"px \" + blur + \"px\"));\n }\n }\n }\n if (sx || sy) {\n var pnx = sx > 0 ? 1 : -1;\n var pny = sy > 0 ? 1 : -1;\n sx = Math.abs(sx);\n sy = Math.abs(sy);\n for (var x$1 = Math.max(ox, sx - ox); x$1 < sx + ox; x$1++) {\n for (var y$1 = Math.max(oy, sy - oy); y$1 < sy + oy; y$1++) {\n arr.push((sc + \" \" + (x$1 * pnx) + \"px \" + (y$1 * pny) + \"px \" + blur + \"px\"));\n }\n }\n arr.push((sc + \" \" + ((sx + ox) * pnx) + \"px \" + ((sy + oy) * pny) + \"px \" + blur + \"px\"));\n }\n return arr.join();\n}\n\nfunction createTransform(tag) {\n return [\n // TODO: I don't know why perspective is 314, it just performances well.\n 'perspective(314px)',\n (\"rotateY(\" + (tag.fry || 0) + \"deg)\"),\n (\"rotateX(\" + (tag.frx || 0) + \"deg)\"),\n (\"rotateZ(\" + (-tag.frz || 0) + \"deg)\"),\n (\"scale(\" + (tag.p ? 1 : (tag.fscx || 100) / 100) + \",\" + (tag.p ? 1 : (tag.fscy || 100) / 100) + \")\"),\n (\"skew(\" + (tag.fax || 0) + \"rad,\" + (tag.fay || 0) + \"rad)\") ].join(' ');\n}\n\nfunction setTransformOrigin(dialogue) {\n var alignment = dialogue.alignment;\n var width = dialogue.width;\n var height = dialogue.height;\n var x = dialogue.x;\n var y = dialogue.y;\n var $div = dialogue.$div;\n var org = dialogue.org;\n if (!org) {\n org = { x: 0, y: 0 };\n if (alignment % 3 === 1) { org.x = x; }\n if (alignment % 3 === 2) { org.x = x + width / 2; }\n if (alignment % 3 === 0) { org.x = x + width; }\n if (alignment <= 3) { org.y = y + height; }\n if (alignment >= 4 && alignment <= 6) { org.y = y + height / 2; }\n if (alignment >= 7) { org.y = y; }\n }\n for (var i = $div.childNodes.length - 1; i >= 0; i--) {\n var node = $div.childNodes[i];\n if (node.dataset.hasRotate === 'true') {\n // It's not extremely precise for offsets are round the value to an integer.\n var tox = org.x - x - node.offsetLeft;\n var toy = org.y - y - node.offsetTop;\n node.style.cssText += (vendor.transform) + \"transform-origin:\" + tox + \"px \" + toy + \"px;\";\n }\n }\n}\n\nfunction getKeyframeString(name, list) {\n return (\"@\" + (vendor.animation) + \"keyframes \" + name + \" {\" + list + \"}\\n\");\n}\n\nvar KeyframeBlockList = function KeyframeBlockList() {\n this.obj = {};\n};\n\nKeyframeBlockList.prototype.set = function set (keyText, prop, value) {\n if (!this.obj[keyText]) { this.obj[keyText] = {}; }\n this.obj[keyText][prop] = value;\n};\n\nKeyframeBlockList.prototype.setT = function setT (ref) {\n var t1 = ref.t1;\n var t2 = ref.t2;\n var duration = ref.duration;\n var prop = ref.prop;\n var from = ref.from;\n var to = ref.to;\n\n this.set('0.000%', prop, from);\n if (t1 < duration) {\n this.set((((t1 / duration * 100).toFixed(3)) + \"%\"), prop, from);\n }\n if (t2 < duration) {\n this.set((((t2 / duration * 100).toFixed(3)) + \"%\"), prop, to);\n }\n this.set('100.000%', prop, to);\n};\n\nKeyframeBlockList.prototype.toString = function toString () {\n var this$1 = this;\n\n return Object.keys(this.obj)\n .map(function (keyText) { return (\n (keyText + \"{\" + (Object.keys(this$1.obj[keyText])\n .map(function (prop) { return (\"\" + (vendor[prop] || '') + prop + \":\" + (this$1.obj[keyText][prop]) + \";\"); })\n .join('')) + \"}\")\n ); })\n .join('');\n};\n\n// TODO: multi \\t can't be merged directly\nfunction mergeT(ts) {\n return ts.reduceRight(function (results, t) {\n var merged = false;\n return results\n .map(function (r) {\n merged = t.t1 === r.t1 && t.t2 === r.t2 && t.accel === r.accel;\n return assign({}, r, merged ? { tag: assign({}, r.tag, t.tag) } : {});\n })\n .concat(merged ? [] : t);\n }, []);\n}\n\nfunction getKeyframes() {\n var this$1 = this;\n\n var keyframes = '';\n this.dialogues.forEach(function (dialogue) {\n var start = dialogue.start;\n var end = dialogue.end;\n var effect = dialogue.effect;\n var move = dialogue.move;\n var fade = dialogue.fade;\n var slices = dialogue.slices;\n var duration = (end - start) * 1000;\n var diaKbl = new KeyframeBlockList();\n // TODO: when effect and move both exist, its behavior is weird, for now only move works.\n if (effect && !move) {\n var name = effect.name;\n var delay = effect.delay;\n var lefttoright = effect.lefttoright;\n var y1 = effect.y1;\n var y2 = effect.y2 || this$1._.resampledRes.height;\n if (name === 'banner') {\n var tx = this$1.scale * (duration / delay) * (lefttoright ? 1 : -1);\n diaKbl.set('0.000%', 'transform', 'translateX(0)');\n diaKbl.set('100.000%', 'transform', (\"translateX(\" + tx + \"px)\"));\n }\n if (/^scroll/.test(name)) {\n var updown = /up/.test(name) ? -1 : 1;\n var tFrom = \"translateY(\" + (this$1.scale * y1 * updown) + \"px)\";\n var tTo = \"translateY(\" + (this$1.scale * y2 * updown) + \"px)\";\n var dp = (y2 - y1) / (duration / delay) * 100;\n diaKbl.set('0.000%', 'transform', tFrom);\n if (dp < 100) {\n diaKbl.set(((dp.toFixed(3)) + \"%\"), 'transform', tTo);\n }\n diaKbl.set('100.000%', 'transform', tTo);\n }\n }\n if (move) {\n var x1 = move.x1;\n var y1$1 = move.y1;\n var x2 = move.x2;\n var y2$1 = move.y2;\n var t1 = move.t1;\n var t2 = move.t2 || duration;\n var pos = dialogue.pos || { x: 0, y: 0 };\n var values = [{ x: x1, y: y1$1 }, { x: x2, y: y2$1 }].map(function (ref) {\n var x = ref.x;\n var y = ref.y;\n\n return (\n (\"translate(\" + (this$1.scale * (x - pos.x)) + \"px, \" + (this$1.scale * (y - pos.y)) + \"px)\")\n );\n });\n diaKbl.setT({ t1: t1, t2: t2, duration: duration, prop: 'transform', from: values[0], to: values[1] });\n }\n if (fade) {\n if (fade.type === 'fad') {\n var t1$1 = fade.t1;\n var t2$1 = fade.t2;\n diaKbl.set('0.000%', 'opacity', 0);\n if (t1$1 < duration) {\n diaKbl.set((((t1$1 / duration * 100).toFixed(3)) + \"%\"), 'opacity', 1);\n if (t1$1 + t2$1 < duration) {\n diaKbl.set(((((duration - t2$1) / duration * 100).toFixed(3)) + \"%\"), 'opacity', 1);\n }\n diaKbl.set('100.000%', 'opacity', 0);\n } else {\n diaKbl.set('100.000%', 'opacity', duration / t1$1);\n }\n } else {\n var a1 = fade.a1;\n var a2 = fade.a2;\n var a3 = fade.a3;\n var t1$2 = fade.t1;\n var t2$2 = fade.t2;\n var t3 = fade.t3;\n var t4 = fade.t4;\n var keyTexts = [t1$2, t2$2, t3, t4].map(function (t) { return (((t / duration * 100).toFixed(3)) + \"%\"); });\n var values$1 = [a1, a2, a3].map(function (a) { return 1 - a / 255; });\n diaKbl.set('0.000%', 'opacity', values$1[0]);\n if (t1$2 < duration) { diaKbl.set(keyTexts[0], 'opacity', values$1[0]); }\n if (t2$2 < duration) { diaKbl.set(keyTexts[1], 'opacity', values$1[1]); }\n if (t3 < duration) { diaKbl.set(keyTexts[2], 'opacity', values$1[1]); }\n if (t4 < duration) { diaKbl.set(keyTexts[3], 'opacity', values$1[2]); }\n diaKbl.set('100.000%', 'opacity', values$1[2]);\n }\n }\n var diaList = diaKbl.toString();\n if (diaList) {\n assign(dialogue, { animationName: (\"ASS-\" + (uuid())) });\n keyframes += getKeyframeString(dialogue.animationName, diaList);\n }\n slices.forEach(function (slice) {\n slice.fragments.forEach(function (fragment) {\n if (!fragment.tag.t || !fragment.tag.t.length) {\n return;\n }\n var kbl = new KeyframeBlockList();\n var fromTag = assign({}, slice.tag, fragment.tag);\n // TODO: accel is not implemented yet\n mergeT(fragment.tag.t).forEach(function (ref) {\n var t1 = ref.t1;\n var t2 = ref.t2;\n var tag = ref.tag;\n\n if (tag.fs) {\n var from = (this$1.scale * getRealFontSize(fromTag.fn, fromTag.fs)) + \"px\";\n var to = (this$1.scale * getRealFontSize(tag.fn, fromTag.fs)) + \"px\";\n kbl.setT({ t1: t1, t2: t2, duration: duration, prop: 'font-size', from: from, to: to });\n }\n if (tag.fsp) {\n var from$1 = (this$1.scale * fromTag.fsp) + \"px\";\n var to$1 = (this$1.scale * tag.fsp) + \"px\";\n kbl.setT({ t1: t1, t2: t2, duration: duration, prop: 'letter-spacing', from: from$1, to: to$1 });\n }\n var hasAlpha = (\n tag.a1 !== undefined\n && tag.a1 === tag.a2\n && tag.a2 === tag.a3\n && tag.a3 === tag.a4\n );\n if (tag.c1 || (tag.a1 && !hasAlpha)) {\n var from$2 = color2rgba(fromTag.a1 + fromTag.c1);\n var to$2 = color2rgba((tag.a1 || fromTag.a1) + (tag.c1 || fromTag.c1));\n kbl.setT({ t1: t1, t2: t2, duration: duration, prop: 'color', from: from$2, to: to$2 });\n }\n if (hasAlpha) {\n var from$3 = 1 - parseInt(fromTag.a1, 16) / 255;\n var to$3 = 1 - parseInt(tag.a1, 16) / 255;\n kbl.setT({ t1: t1, t2: t2, duration: duration, prop: 'opacity', from: from$3, to: to$3 });\n }\n var hasStroke = strokeTags.some(function (x) { return (\n tag[x] !== undefined\n && tag[x] !== (fragment.tag[x] || slice.tag[x])\n ); });\n if (hasStroke) {\n var scale = /Yes/i.test(this$1.info.ScaledBorderAndShadow) ? this$1.scale : 1;\n var from$4 = createCSSStroke(fromTag, scale);\n var to$4 = createCSSStroke(assign({}, fromTag, tag), scale);\n kbl.setT({ t1: t1, t2: t2, duration: duration, prop: 'text-shadow', from: from$4, to: to$4 });\n }\n var hasTransfrom = transformTags.some(function (x) { return (\n tag[x] !== undefined\n && tag[x] !== (fragment.tag[x] || slice.tag[x])\n ); });\n if (hasTransfrom) {\n var toTag = assign({}, fromTag, tag);\n if (fragment.drawing) {\n // scales will be handled inside svg\n assign(toTag, {\n p: 0,\n fscx: ((tag.fscx || fromTag.fscx) / fromTag.fscx) * 100,\n fscy: ((tag.fscy || fromTag.fscy) / fromTag.fscy) * 100,\n });\n assign(fromTag, { fscx: 100, fscy: 100 });\n }\n var from$5 = createTransform(fromTag);\n var to$5 = createTransform(toTag);\n kbl.setT({ t1: t1, t2: t2, duration: duration, prop: 'transform', from: from$5, to: to$5 });\n }\n });\n var list = kbl.toString();\n assign(fragment, { animationName: (\"ASS-\" + (uuid())) });\n keyframes += getKeyframeString(fragment.animationName, list);\n });\n });\n });\n return keyframes;\n}\n\nfunction createAnimation(name, duration, delay) {\n var va = vendor.animation;\n return (\n va + \"animation-name:\" + name + \";\"\n + va + \"animation-duration:\" + duration + \"s;\"\n + va + \"animation-delay:\" + delay + \"s;\"\n + va + \"animation-timing-function:linear;\"\n + va + \"animation-iteration-count:1;\"\n + va + \"animation-fill-mode:forwards;\"\n );\n}\n\nfunction createDrawing(fragment, styleTag) {\n var tag = assign({}, styleTag, fragment.tag);\n var ref = fragment.drawing;\n var minX = ref.minX;\n var minY = ref.minY;\n var width = ref.width;\n var height = ref.height;\n var baseScale = this.scale / (1 << (tag.p - 1));\n var scaleX = (tag.fscx ? tag.fscx / 100 : 1) * baseScale;\n var scaleY = (tag.fscy ? tag.fscy / 100 : 1) * baseScale;\n var blur = tag.blur || tag.be || 0;\n var vbx = tag.xbord + (tag.xshad < 0 ? -tag.xshad : 0) + blur;\n var vby = tag.ybord + (tag.yshad < 0 ? -tag.yshad : 0) + blur;\n var vbw = width * scaleX + 2 * tag.xbord + Math.abs(tag.xshad) + 2 * blur;\n var vbh = height * scaleY + 2 * tag.ybord + Math.abs(tag.yshad) + 2 * blur;\n var $svg = createSVGEl('svg', [\n ['width', vbw],\n ['height', vbh],\n ['viewBox', ((-vbx) + \" \" + (-vby) + \" \" + vbw + \" \" + vbh)] ]);\n var strokeScale = /Yes/i.test(this.info.ScaledBorderAndShadow) ? this.scale : 1;\n var filterId = \"ASS-\" + (uuid());\n var $defs = createSVGEl('defs');\n $defs.appendChild(createSVGStroke(tag, filterId, strokeScale));\n $svg.appendChild($defs);\n var symbolId = \"ASS-\" + (uuid());\n var $symbol = createSVGEl('symbol', [\n ['id', symbolId],\n ['viewBox', (minX + \" \" + minY + \" \" + width + \" \" + height)] ]);\n $symbol.appendChild(createSVGEl('path', [['d', fragment.drawing.d]]));\n $svg.appendChild($symbol);\n $svg.appendChild(createSVGEl('use', [\n ['width', width * scaleX],\n ['height', height * scaleY],\n ['xlink:href', (\"#\" + symbolId)],\n ['filter', (\"url(#\" + filterId + \")\")] ]));\n $svg.style.cssText = (\n 'position:absolute;'\n + \"left:\" + (minX * scaleX - vbx) + \"px;\"\n + \"top:\" + (minY * scaleY - vby) + \"px;\"\n );\n return {\n $svg: $svg,\n cssText: (\"position:relative;width:\" + (width * scaleX) + \"px;height:\" + (height * scaleY) + \"px;\"),\n };\n}\n\nfunction encodeText(text, q) {\n return text\n .replace(//g, '>')\n .replace(/\\s/g, ' ')\n .replace(/\\\\h/g, ' ')\n .replace(/\\\\N/g, '
')\n .replace(/\\\\n/g, q === 2 ? '
' : ' ');\n}\n\nfunction createDialogue(dialogue) {\n var this$1 = this;\n\n var $div = document.createElement('div');\n $div.className = 'ASS-dialogue';\n var df = document.createDocumentFragment();\n var slices = dialogue.slices;\n var start = dialogue.start;\n var end = dialogue.end;\n slices.forEach(function (slice) {\n var borderStyle = slice.borderStyle;\n slice.fragments.forEach(function (fragment) {\n var text = fragment.text;\n var drawing = fragment.drawing;\n var animationName = fragment.animationName;\n var tag = assign({}, slice.tag, fragment.tag);\n var cssText = 'display:inline-block;';\n var vct = this$1.video.currentTime;\n if (!drawing) {\n cssText += \"font-family:\\\"\" + (tag.fn) + \"\\\",Arial;\";\n cssText += \"font-size:\" + (this$1.scale * getRealFontSize(tag.fn, tag.fs)) + \"px;\";\n cssText += \"color:\" + (color2rgba(tag.a1 + tag.c1)) + \";\";\n var scale = /Yes/i.test(this$1.info.ScaledBorderAndShadow) ? this$1.scale : 1;\n if (borderStyle === 1) {\n cssText += \"text-shadow:\" + (createCSSStroke(tag, scale)) + \";\";\n }\n if (borderStyle === 3) {\n cssText += (\n \"background-color:\" + (color2rgba(tag.a3 + tag.c3)) + \";\"\n + \"box-shadow:\" + (createCSSStroke(tag, scale)) + \";\"\n );\n }\n cssText += tag.b ? (\"font-weight:\" + (tag.b === 1 ? 'bold' : tag.b) + \";\") : '';\n cssText += tag.i ? 'font-style:italic;' : '';\n cssText += (tag.u || tag.s) ? (\"text-decoration:\" + (tag.u ? 'underline' : '') + \" \" + (tag.s ? 'line-through' : '') + \";\") : '';\n cssText += tag.fsp ? (\"letter-spacing:\" + (tag.fsp) + \"px;\") : '';\n // TODO: (tag.q === 0) and (tag.q === 3) are not implemented yet,\n // for now just handle it as (tag.q === 1)\n if (tag.q === 1 || tag.q === 0 || tag.q === 3) {\n cssText += 'word-break:break-all;white-space:normal;';\n }\n if (tag.q === 2) {\n cssText += 'word-break:normal;white-space:nowrap;';\n }\n }\n var hasTransfrom = transformTags.some(function (x) { return (\n /^fsc[xy]$/.test(x) ? tag[x] !== 100 : !!tag[x]\n ); });\n if (hasTransfrom) {\n cssText += (vendor.transform) + \"transform:\" + (createTransform(tag)) + \";\";\n if (!drawing) {\n cssText += 'transform-style:preserve-3d;word-break:normal;white-space:nowrap;';\n }\n }\n if (animationName) {\n cssText += createAnimation(animationName, end - start, Math.min(0, start - vct));\n }\n if (drawing && tag.pbo) {\n var pbo = this$1.scale * -tag.pbo * (tag.fscy || 100) / 100;\n cssText += \"vertical-align:\" + pbo + \"px;\";\n }\n\n var hasRotate = /\"fr[xyz]\":[^0]/.test(JSON.stringify(tag));\n encodeText(text, tag.q).split('
').forEach(function (html, idx) {\n var $span = document.createElement('span');\n $span.dataset.hasRotate = hasRotate;\n if (drawing) {\n var obj = createDrawing.call(this$1, fragment, slice.tag);\n $span.style.cssText = obj.cssText;\n $span.appendChild(obj.$svg);\n } else {\n if (idx) {\n df.appendChild(document.createElement('br'));\n }\n if (!html) {\n return;\n }\n $span.innerHTML = html;\n }\n // TODO: maybe it can be optimized\n $span.style.cssText += cssText;\n df.appendChild($span);\n });\n });\n });\n $div.appendChild(df);\n return $div;\n}\n\nfunction allocate(dialogue) {\n var layer = dialogue.layer;\n var margin = dialogue.margin;\n var width = dialogue.width;\n var height = dialogue.height;\n var alignment = dialogue.alignment;\n var end = dialogue.end;\n var stageWidth = this.width - (this.scale * (margin.left + margin.right) | 0);\n var stageHeight = this.height;\n var vertical = this.scale * margin.vertical | 0;\n var vct = this.video.currentTime * 100;\n this._.space[layer] = this._.space[layer] || {\n left: { width: new Uint16Array(stageHeight + 1), end: new Uint16Array(stageHeight + 1) },\n center: { width: new Uint16Array(stageHeight + 1), end: new Uint16Array(stageHeight + 1) },\n right: { width: new Uint16Array(stageHeight + 1), end: new Uint16Array(stageHeight + 1) },\n };\n var channel = this._.space[layer];\n var align = ['right', 'left', 'center'][alignment % 3];\n var willCollide = function (y) {\n var lw = channel.left.width[y];\n var cw = channel.center.width[y];\n var rw = channel.right.width[y];\n var le = channel.left.end[y];\n var ce = channel.center.end[y];\n var re = channel.right.end[y];\n return (\n (align === 'left' && (\n (le > vct && lw)\n || (ce > vct && cw && 2 * width + cw > stageWidth)\n || (re > vct && rw && width + rw > stageWidth)\n ))\n || (align === 'center' && (\n (le > vct && lw && 2 * lw + width > stageWidth)\n || (ce > vct && cw)\n || (re > vct && rw && 2 * rw + width > stageWidth)\n ))\n || (align === 'right' && (\n (le > vct && lw && lw + width > stageWidth)\n || (ce > vct && cw && 2 * width + cw > stageWidth)\n || (re > vct && rw)\n ))\n );\n };\n var count = 0;\n var result = 0;\n var find = function (y) {\n count = willCollide(y) ? 0 : count + 1;\n if (count >= height) {\n result = y;\n return true;\n }\n return false;\n };\n if (alignment <= 3) {\n for (var i = stageHeight - vertical - 1; i > vertical; i--) {\n if (find(i)) { break; }\n }\n } else if (alignment >= 7) {\n for (var i$1 = vertical + 1; i$1 < stageHeight - vertical; i$1++) {\n if (find(i$1)) { break; }\n }\n } else {\n for (var i$2 = (stageHeight - height) >> 1; i$2 < stageHeight - vertical; i$2++) {\n if (find(i$2)) { break; }\n }\n }\n if (alignment > 3) {\n result -= height - 1;\n }\n for (var i$3 = result; i$3 < result + height; i$3++) {\n channel[align].width[i$3] = width;\n channel[align].end[i$3] = end * 100;\n }\n return result;\n}\n\nfunction getPosition(dialogue) {\n var effect = dialogue.effect;\n var move = dialogue.move;\n var alignment = dialogue.alignment;\n var width = dialogue.width;\n var height = dialogue.height;\n var margin = dialogue.margin;\n var slices = dialogue.slices;\n var x = 0;\n var y = 0;\n if (effect) {\n if (effect.name === 'banner') {\n if (alignment <= 3) { y = this.height - height - margin.vertical; }\n if (alignment >= 4 && alignment <= 6) { y = (this.height - height) / 2; }\n if (alignment >= 7) { y = margin.vertical; }\n x = effect.lefttoright ? -width : this.width;\n }\n } else if (dialogue.pos || move) {\n var pos = dialogue.pos || { x: 0, y: 0 };\n if (alignment % 3 === 1) { x = this.scale * pos.x; }\n if (alignment % 3 === 2) { x = this.scale * pos.x - width / 2; }\n if (alignment % 3 === 0) { x = this.scale * pos.x - width; }\n if (alignment <= 3) { y = this.scale * pos.y - height; }\n if (alignment >= 4 && alignment <= 6) { y = this.scale * pos.y - height / 2; }\n if (alignment >= 7) { y = this.scale * pos.y; }\n } else {\n if (alignment % 3 === 1) { x = 0; }\n if (alignment % 3 === 2) { x = (this.width - width) / 2; }\n if (alignment % 3 === 0) { x = this.width - width - this.scale * margin.right; }\n var hasT = slices.some(function (slice) { return (\n slice.fragments.some(function (ref) {\n var animationName = ref.animationName;\n\n return animationName;\n })\n ); });\n if (hasT) {\n if (alignment <= 3) { y = this.height - height - margin.vertical; }\n if (alignment >= 4 && alignment <= 6) { y = (this.height - height) / 2; }\n if (alignment >= 7) { y = margin.vertical; }\n } else {\n y = allocate.call(this, dialogue);\n }\n }\n return { x: x, y: y };\n}\n\nfunction createStyle(dialogue) {\n var layer = dialogue.layer;\n var start = dialogue.start;\n var end = dialogue.end;\n var alignment = dialogue.alignment;\n var effect = dialogue.effect;\n var pos = dialogue.pos;\n var margin = dialogue.margin;\n var animationName = dialogue.animationName;\n var width = dialogue.width;\n var height = dialogue.height;\n var x = dialogue.x;\n var y = dialogue.y;\n var vct = this.video.currentTime;\n var cssText = '';\n if (layer) { cssText += \"z-index:\" + layer + \";\"; }\n if (animationName) {\n cssText += createAnimation(animationName, end - start, Math.min(0, start - vct));\n }\n cssText += \"text-align:\" + (['right', 'left', 'center'][alignment % 3]) + \";\";\n if (!effect) {\n var mw = this.width - this.scale * (margin.left + margin.right);\n cssText += \"max-width:\" + mw + \"px;\";\n if (!pos) {\n if (alignment % 3 === 1) {\n cssText += \"margin-left:\" + (this.scale * margin.left) + \"px;\";\n }\n if (alignment % 3 === 0) {\n cssText += \"margin-right:\" + (this.scale * margin.right) + \"px;\";\n }\n if (width > this.width - this.scale * (margin.left + margin.right)) {\n cssText += \"margin-left:\" + (this.scale * margin.left) + \"px;\";\n cssText += \"margin-right:\" + (this.scale * margin.right) + \"px;\";\n }\n }\n }\n cssText += \"width:\" + width + \"px;height:\" + height + \"px;left:\" + x + \"px;top:\" + y + \"px;\";\n return cssText;\n}\n\nfunction renderer(dialogue) {\n var $div = createDialogue.call(this, dialogue);\n assign(dialogue, { $div: $div });\n this._.$stage.appendChild($div);\n var ref = $div.getBoundingClientRect();\n var width = ref.width;\n var height = ref.height;\n assign(dialogue, { width: width, height: height });\n assign(dialogue, getPosition.call(this, dialogue));\n $div.style.cssText = createStyle.call(this, dialogue);\n setTransformOrigin(dialogue);\n setClipPath.call(this, dialogue);\n return dialogue;\n}\n\nfunction framing() {\n var vct = this.video.currentTime;\n for (var i = this._.stagings.length - 1; i >= 0; i--) {\n var dia = this._.stagings[i];\n var end = dia.end;\n if (dia.effect && /scroll/.test(dia.effect.name)) {\n var ref = dia.effect;\n var y1 = ref.y1;\n var y2 = ref.y2;\n var delay = ref.delay;\n var duration = ((y2 || this._.resampledRes.height) - y1) / (1000 / delay);\n end = Math.min(end, dia.start + duration);\n }\n if (end < vct) {\n this._.$stage.removeChild(dia.$div);\n if (dia.$clipPath) {\n this._.$defs.removeChild(dia.$clipPath);\n }\n this._.stagings.splice(i, 1);\n }\n }\n var dias = this.dialogues;\n while (\n this._.index < dias.length\n && vct >= dias[this._.index].start\n ) {\n if (vct < dias[this._.index].end) {\n var dia$1 = renderer.call(this, dias[this._.index]);\n this._.stagings.push(dia$1);\n }\n ++this._.index;\n }\n}\n\nfunction play() {\n var this$1 = this;\n\n var frame = function () {\n framing.call(this$1);\n this$1._.requestId = raf(frame);\n };\n caf(this._.requestId);\n this._.requestId = raf(frame);\n this._.$stage.classList.remove('ASS-animation-paused');\n return this;\n}\n\nfunction pause() {\n caf(this._.requestId);\n this._.requestId = 0;\n this._.$stage.classList.add('ASS-animation-paused');\n return this;\n}\n\nfunction clear() {\n while (this._.$stage.lastChild) {\n this._.$stage.removeChild(this._.$stage.lastChild);\n }\n while (this._.$defs.lastChild) {\n this._.$defs.removeChild(this._.$defs.lastChild);\n }\n this._.stagings = [];\n this._.space = [];\n}\n\nfunction seek() {\n var vct = this.video.currentTime;\n var dias = this.dialogues;\n clear.call(this);\n this._.index = (function () {\n var from = 0;\n var to = dias.length - 1;\n while (from + 1 < to && vct > dias[(to + from) >> 1].end) {\n from = (to + from) >> 1;\n }\n if (!from) { return 0; }\n for (var i = from; i < to; i++) {\n if (\n dias[i].end > vct && vct >= dias[i].start\n || (i && dias[i - 1].end < vct && vct < dias[i].start)\n ) {\n return i;\n }\n }\n return to;\n })();\n framing.call(this);\n}\n\nfunction bindEvents() {\n var l = this._.listener;\n l.play = play.bind(this);\n l.pause = pause.bind(this);\n l.seeking = seek.bind(this);\n this.video.addEventListener('play', l.play);\n this.video.addEventListener('pause', l.pause);\n this.video.addEventListener('seeking', l.seeking);\n}\n\nfunction unbindEvents() {\n var l = this._.listener;\n this.video.removeEventListener('play', l.play);\n this.video.removeEventListener('pause', l.pause);\n this.video.removeEventListener('seeking', l.seeking);\n l.play = null;\n l.pause = null;\n l.seeking = null;\n}\n\nfunction resize() {\n var cw = this.video.clientWidth;\n var ch = this.video.clientHeight;\n var vw = this.video.videoWidth || cw;\n var vh = this.video.videoHeight || ch;\n var sw = this._.scriptRes.width;\n var sh = this._.scriptRes.height;\n var rw = sw;\n var rh = sh;\n var videoScale = Math.min(cw / vw, ch / vh);\n if (this.resampling === 'video_width') {\n rh = sw / vw * vh;\n }\n if (this.resampling === 'video_height') {\n rw = sh / vh * vw;\n }\n this.scale = Math.min(cw / rw, ch / rh);\n if (this.resampling === 'script_width') {\n this.scale = videoScale * (vw / rw);\n }\n if (this.resampling === 'script_height') {\n this.scale = videoScale * (vh / rh);\n }\n this.width = this.scale * rw;\n this.height = this.scale * rh;\n this._.resampledRes = { width: rw, height: rh };\n\n this.container.style.cssText = \"width:\" + cw + \"px;height:\" + ch + \"px;\";\n var cssText = (\n \"width:\" + (this.width) + \"px;\"\n + \"height:\" + (this.height) + \"px;\"\n + \"top:\" + ((ch - this.height) / 2) + \"px;\"\n + \"left:\" + ((cw - this.width) / 2) + \"px;\"\n );\n this._.$stage.style.cssText = cssText;\n this._.$svg.style.cssText = cssText;\n this._.$svg.setAttributeNS(null, 'viewBox', (\"0 0 \" + sw + \" \" + sh));\n\n this._.$animation.innerHTML = getKeyframes.call(this);\n seek.call(this);\n\n return this;\n}\n\nvar GLOBAL_CSS = '.ASS-container,.ASS-stage{position:relative;overflow:hidden}.ASS-container video{position:absolute;top:0;left:0}.ASS-stage{pointer-events:none;position:absolute}.ASS-dialogue{font-size:0;position:absolute}.ASS-fix-font-size{position:absolute;visibility:hidden}.ASS-fix-objectBoundingBox{width:100%;height:100%;position:absolute;top:0;left:0}.ASS-animation-paused *{-webkit-animation-play-state:paused!important;animation-play-state:paused!important}';\n\nfunction init(source, video, options) {\n if ( options === void 0 ) options = {};\n\n this.scale = 1;\n\n // private variables\n this._ = {\n index: 0,\n stagings: [],\n space: [],\n listener: {},\n $svg: createSVGEl('svg'),\n $defs: createSVGEl('defs'),\n $stage: document.createElement('div'),\n $animation: document.createElement('style'),\n };\n this._.$svg.appendChild(this._.$defs);\n this._.$stage.className = 'ASS-stage ASS-animation-paused';\n\n this._.resampling = options.resampling || 'video_height';\n\n this.container = options.container || document.createElement('div');\n this.container.classList.add('ASS-container');\n this.container.appendChild($fixFontSize);\n this.container.appendChild(this._.$svg);\n this._.hasInitContainer = !!options.container;\n\n this.video = video;\n bindEvents.call(this);\n if (!this._.hasInitContainer) {\n var isPlaying = !video.paused;\n video.parentNode.insertBefore(this.container, video);\n this.container.appendChild(video);\n if (isPlaying && video.paused) {\n video.play();\n }\n }\n this.container.appendChild(this._.$stage);\n\n var ref = compile(source);\n var info = ref.info;\n var width = ref.width;\n var height = ref.height;\n var dialogues = ref.dialogues;\n this.info = info;\n this._.scriptRes = {\n width: width || video.videoWidth,\n height: height || video.videoHeight,\n };\n this.dialogues = dialogues;\n\n var styleRoot = getStyleRoot(this.container);\n var $style = styleRoot.querySelector('#ASS-global-style');\n if (!$style) {\n $style = document.createElement('style');\n $style.type = 'text/css';\n $style.id = 'ASS-global-style';\n $style.appendChild(document.createTextNode(GLOBAL_CSS));\n styleRoot.appendChild($style);\n }\n this._.$animation.type = 'text/css';\n this._.$animation.className = 'ASS-animation';\n styleRoot.appendChild(this._.$animation);\n\n resize.call(this);\n\n if (!this.video.paused) {\n seek.call(this);\n play.call(this);\n }\n\n return this;\n}\n\nfunction show() {\n this._.$stage.style.visibility = 'visible';\n return this;\n}\n\nfunction hide() {\n this._.$stage.style.visibility = 'hidden';\n return this;\n}\n\nfunction destroy() {\n pause.call(this);\n clear.call(this);\n unbindEvents.call(this, this._.listener);\n\n var styleRoot = getStyleRoot(this.container);\n if (!this._.hasInitContainer) {\n var isPlay = !this.video.paused;\n this.container.parentNode.insertBefore(this.video, this.container);\n this.container.parentNode.removeChild(this.container);\n if (isPlay && this.video.paused) {\n this.video.play();\n }\n }\n styleRoot.removeChild(this._.$animation);\n\n // eslint-disable-next-line no-restricted-syntax\n for (var key in this) {\n if (Object.prototype.hasOwnProperty.call(this, key)) {\n this[key] = null;\n }\n }\n\n return this;\n}\n\nvar regex = /^(video|script)_(width|height)$/;\n\nfunction getter() {\n return regex.test(this._.resampling) ? this._.resampling : 'video_height';\n}\n\nfunction setter(r) {\n if (r === this._.resampling) { return r; }\n if (regex.test(r)) {\n this._.resampling = r;\n this.resize();\n }\n return this._.resampling;\n}\n\nvar ASS = function ASS(source, video, options) {\n if (typeof source !== 'string') {\n return this;\n }\n return init.call(this, source, video, options);\n};\n\nvar prototypeAccessors = { resampling: { configurable: true } };\n\nASS.prototype.resize = function resize$1 () {\n return resize.call(this);\n};\n\nASS.prototype.show = function show$1 () {\n return show.call(this);\n};\n\nASS.prototype.hide = function hide$1 () {\n return hide.call(this);\n};\n\nASS.prototype.destroy = function destroy$1 () {\n return destroy.call(this);\n};\n\nprototypeAccessors.resampling.get = function () {\n return getter.call(this);\n};\n\nprototypeAccessors.resampling.set = function (r) {\n return setter.call(this, r);\n};\n\nObject.defineProperties( ASS.prototype, prototypeAccessors );\n\nexport default ASS;\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import ASS from 'assjs';\nimport './style.scss';\n\nfunction artplayerPluginAss(url) {\n return (art) => {\n let ass = null;\n fetch(url)\n .then((res) => res.text())\n .then((text) => {\n const { $video, $subtitle } = art.template;\n $subtitle.classList.add('artplayer-plugin-ass');\n\n art.once('ready', () => {\n ass = new ASS(text, $video, {\n container: $subtitle,\n resampling: 'video_width',\n });\n\n ass.resize();\n art.emit('artplayerPluginAss', ass);\n art.on('resize', () => ass.resize());\n art.on('destroy', () => ass.destroy());\n });\n });\n return {\n name: 'artplayerPluginAss',\n ass,\n };\n };\n}\n\nexport default artplayerPluginAss;\n"],"names":["artplayerPluginAss","url","art","ass","fetch","then","res","text","template","$video","$subtitle","classList","add","once","ASS","container","resampling","resize","emit","on","destroy","name"],"mappings":";;;;;;EAAA,SAAS,WAAW,CAAC,IAAI,EAAE;EAC3B,EAAE,IAAI,KAAK,GAAG,IAAI;EAClB,KAAK,WAAW,EAAE;EAClB,KAAK,IAAI,EAAE;EACX,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;EACtB,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;EAC7B,IAAI,OAAO;EACX,MAAM,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;EACpB,MAAM,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;EAC9B,MAAM,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;EACpC,MAAM,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;EACtC,KAAK,CAAC;EACN,GAAG;EACH,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;EAClC,IAAI,OAAO;EACX,MAAM,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;EACpB,MAAM,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,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A5B,EAAiC;EAC7B,SAAO,UAACC,GAAD,EAAS;EACZ,QAAIC,GAAG,GAAG,IAAV;EACAC,IAAAA,KAAK,CAACH,GAAD,CAAL,CACKI,IADL,CACU,UAACC,GAAD;EAAA,aAASA,GAAG,CAACC,IAAJ,EAAT;EAAA,KADV,EAEKF,IAFL,CAEU,UAACE,IAAD,EAAU;EAAA,0BACkBL,GAAG,CAACM,QADtB;EAAA,UACJC,MADI,iBACJA,MADI;EAAA,UACIC,SADJ,iBACIA,SADJ;EAEZA,MAAAA,SAAS,CAACC,SAAV,CAAoBC,GAApB,CAAwB,sBAAxB;EAEAV,MAAAA,GAAG,CAACW,IAAJ,CAAS,OAAT,EAAkB,YAAM;EACpBV,QAAAA,GAAG,GAAG,IAAIW,GAAJ,CAAQP,IAAR,EAAcE,MAAd,EAAsB;EACxBM,UAAAA,SAAS,EAAEL,SADa;EAExBM,UAAAA,UAAU,EAAE;EAFY,SAAtB,CAAN;EAKAb,QAAAA,GAAG,CAACc,MAAJ;EACAf,QAAAA,GAAG,CAACgB,IAAJ,CAAS,oBAAT,EAA+Bf,GAA/B;EACAD,QAAAA,GAAG,CAACiB,EAAJ,CAAO,QAAP,EAAiB;EAAA,iBAAMhB,GAAG,CAACc,MAAJ,EAAN;EAAA,SAAjB;EACAf,QAAAA,GAAG,CAACiB,EAAJ,CAAO,SAAP,EAAkB;EAAA,iBAAMhB,GAAG,CAACiB,OAAJ,EAAN;EAAA,SAAlB;EACH,OAVD;EAWH,KAjBL;EAkBA,WAAO;EACHC,MAAAA,IAAI,EAAE,oBADH;EAEHlB,MAAAA,GAAG,EAAHA;EAFG,KAAP;EAIH,GAxBD;EAyBH;;;;;;;;"}
\ No newline at end of file
diff --git a/docs/uncompiled/artplayer-plugin-gif.js b/docs/uncompiled/artplayer-plugin-gif.js
deleted file mode 100644
index 83a08e962..000000000
--- a/docs/uncompiled/artplayer-plugin-gif.js
+++ /dev/null
@@ -1,3037 +0,0 @@
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.artplayerPluginGif = factory());
-}(this, (function () { 'use strict';
-
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
- }
-
- var defineProperty = _defineProperty;
-
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
- function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
- }
-
- var gifshot = createCommonjsModule(function (module, exports) {
- (function(window, document, navigator, undefined$1) {
-
- /*
- utils.js
- ========
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- var utils = {
- URL: window.URL || window.webkitURL || window.mozURL || window.msURL,
- getUserMedia: function () {
- var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
-
- return getUserMedia ? getUserMedia.bind(navigator) : getUserMedia;
- }(),
- requestAnimFrame: window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame,
- requestTimeout: function requestTimeout(callback, delay) {
- callback = callback || utils.noop;
- delay = delay || 0;
-
- if (!utils.requestAnimFrame) {
- return setTimeout(callback, delay);
- }
-
- var start = new Date().getTime();
- var handle = new Object();
- var requestAnimFrame = utils.requestAnimFrame;
-
- var loop = function loop() {
- var current = new Date().getTime();
- var delta = current - start;
-
- delta >= delay ? callback.call() : handle.value = requestAnimFrame(loop);
- };
-
- handle.value = requestAnimFrame(loop);
-
- return handle;
- },
- Blob: window.Blob || window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder,
- btoa: function () {
- var btoa = window.btoa || function (input) {
- var output = '';
- var i = 0;
- var l = input.length;
- var key = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- var chr1 = void 0;
- var chr2 = void 0;
- var chr3 = void 0;
- var enc1 = void 0;
- var enc2 = void 0;
- var enc3 = void 0;
- var enc4 = void 0;
-
- while (i < l) {
- chr1 = input.charCodeAt(i++);
- chr2 = input.charCodeAt(i++);
- chr3 = input.charCodeAt(i++);
- enc1 = chr1 >> 2;
- enc2 = (chr1 & 3) << 4 | chr2 >> 4;
- enc3 = (chr2 & 15) << 2 | chr3 >> 6;
- enc4 = chr3 & 63;
-
- if (isNaN(chr2)) {
- enc3 = enc4 = 64;
- } else if (isNaN(chr3)) {
- enc4 = 64;
- }
-
- output = output + key.charAt(enc1) + key.charAt(enc2) + key.charAt(enc3) + key.charAt(enc4);
- }
-
- return output;
- };
-
- return btoa ? btoa.bind(window) : utils.noop;
- }(),
- isObject: function isObject(obj) {
- return obj && Object.prototype.toString.call(obj) === '[object Object]';
- },
- isEmptyObject: function isEmptyObject(obj) {
- return utils.isObject(obj) && !Object.keys(obj).length;
- },
- isArray: function isArray(arr) {
- return arr && Array.isArray(arr);
- },
- isFunction: function isFunction(func) {
- return func && typeof func === 'function';
- },
- isElement: function isElement(elem) {
- return elem && elem.nodeType === 1;
- },
- isString: function isString(value) {
- return typeof value === 'string' || Object.prototype.toString.call(value) === '[object String]';
- },
- isSupported: {
- canvas: function canvas() {
- var el = document.createElement('canvas');
-
- return el && el.getContext && el.getContext('2d');
- },
- webworkers: function webworkers() {
- return window.Worker;
- },
- blob: function blob() {
- return utils.Blob;
- },
- Uint8Array: function Uint8Array() {
- return window.Uint8Array;
- },
- Uint32Array: function Uint32Array() {
- return window.Uint32Array;
- },
- videoCodecs: function () {
- var testEl = document.createElement('video');
- var supportObj = {
- 'mp4': false,
- 'h264': false,
- 'ogv': false,
- 'ogg': false,
- 'webm': false
- };
-
- try {
- if (testEl && testEl.canPlayType) {
- // Check for MPEG-4 support
- supportObj.mp4 = testEl.canPlayType('video/mp4; codecs="mp4v.20.8"') !== '';
-
- // Check for h264 support
- supportObj.h264 = (testEl.canPlayType('video/mp4; codecs="avc1.42E01E"') || testEl.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')) !== '';
-
- // Check for Ogv support
- supportObj.ogv = testEl.canPlayType('video/ogg; codecs="theora"') !== '';
-
- // Check for Ogg support
- supportObj.ogg = testEl.canPlayType('video/ogg; codecs="theora"') !== '';
-
- // Check for Webm support
- supportObj.webm = testEl.canPlayType('video/webm; codecs="vp8, vorbis"') !== -1;
- }
- } catch (e) {}
-
- return supportObj;
- }()
- },
- noop: function noop() {},
- each: function each(collection, callback) {
- var x = void 0;
- var len = void 0;
-
- if (utils.isArray(collection)) {
- x = -1;
- len = collection.length;
-
- while (++x < len) {
- if (callback(x, collection[x]) === false) {
- break;
- }
- }
- } else if (utils.isObject(collection)) {
- for (x in collection) {
- if (collection.hasOwnProperty(x)) {
- if (callback(x, collection[x]) === false) {
- break;
- }
- }
- }
- }
- },
- mergeOptions: function mergeOptions(defaultOptions, userOptions) {
- if (!utils.isObject(defaultOptions) || !utils.isObject(userOptions) || !Object.keys) {
- return;
- }
-
- var newObj = {};
-
- utils.each(defaultOptions, function (key, val) {
- newObj[key] = defaultOptions[key];
- });
-
- utils.each(userOptions, function (key, val) {
- var currentUserOption = userOptions[key];
-
- if (!utils.isObject(currentUserOption)) {
- newObj[key] = currentUserOption;
- } else {
- if (!defaultOptions[key]) {
- newObj[key] = currentUserOption;
- } else {
- newObj[key] = utils.mergeOptions(defaultOptions[key], currentUserOption);
- }
- }
- });
-
- return newObj;
- },
- setCSSAttr: function setCSSAttr(elem, attr, val) {
- if (!utils.isElement(elem)) {
- return;
- }
-
- if (utils.isString(attr) && utils.isString(val)) {
- elem.style[attr] = val;
- } else if (utils.isObject(attr)) {
- utils.each(attr, function (key, val) {
- elem.style[key] = val;
- });
- }
- },
- removeElement: function removeElement(node) {
- if (!utils.isElement(node)) {
- return;
- }
- if (node.parentNode) {
- node.parentNode.removeChild(node);
- }
- },
- createWebWorker: function createWebWorker(content) {
- if (!utils.isString(content)) {
- return {};
- }
-
- try {
- var blob = new utils.Blob([content], {
- 'type': 'text/javascript'
- });
- var objectUrl = utils.URL.createObjectURL(blob);
- var worker = new Worker(objectUrl);
-
- return {
- 'objectUrl': objectUrl,
- 'worker': worker
- };
- } catch (e) {
- return '' + e;
- }
- },
- getExtension: function getExtension(src) {
- return src.substr(src.lastIndexOf('.') + 1, src.length);
- },
- getFontSize: function getFontSize() {
- var options = arguments.length > 0 && arguments[0] !== undefined$1 ? arguments[0] : {};
-
- if (!document.body || options.resizeFont === false) {
- return options.fontSize;
- }
-
- var text = options.text;
- var containerWidth = options.gifWidth;
- var fontSize = parseInt(options.fontSize, 10);
- var minFontSize = parseInt(options.minFontSize, 10);
- var div = document.createElement('div');
- var span = document.createElement('span');
-
- div.setAttribute('width', containerWidth);
- div.appendChild(span);
-
- span.innerHTML = text;
- span.style.fontSize = fontSize + 'px';
- span.style.textIndent = '-9999px';
- span.style.visibility = 'hidden';
-
- document.body.appendChild(span);
-
- while (span.offsetWidth > containerWidth && fontSize >= minFontSize) {
- span.style.fontSize = --fontSize + 'px';
- }
-
- document.body.removeChild(span);
-
- return fontSize + 'px';
- },
- webWorkerError: false
- };
-
-
-
- var utils$2 = Object.freeze({
- default: utils
- });
-
- /*
- error.js
- ========
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- // Dependencies
- var error = {
- validate: function validate(skipObj) {
- skipObj = utils.isObject(skipObj) ? skipObj : {};
-
- var errorObj = {};
-
- utils.each(error.validators, function (indece, currentValidator) {
- var errorCode = currentValidator.errorCode;
-
- if (!skipObj[errorCode] && !currentValidator.condition) {
- errorObj = currentValidator;
- errorObj.error = true;
-
- return false;
- }
- });
-
- delete errorObj.condition;
-
- return errorObj;
- },
- isValid: function isValid(skipObj) {
- var errorObj = error.validate(skipObj);
- var isValid = errorObj.error !== true ? true : false;
-
- return isValid;
- },
- validators: [{
- condition: utils.isFunction(utils.getUserMedia),
- errorCode: 'getUserMedia',
- errorMsg: 'The getUserMedia API is not supported in your browser'
- }, {
- condition: utils.isSupported.canvas(),
- errorCode: 'canvas',
- errorMsg: 'Canvas elements are not supported in your browser'
- }, {
- condition: utils.isSupported.webworkers(),
- errorCode: 'webworkers',
- errorMsg: 'The Web Workers API is not supported in your browser'
- }, {
- condition: utils.isFunction(utils.URL),
- errorCode: 'window.URL',
- errorMsg: 'The window.URL API is not supported in your browser'
- }, {
- condition: utils.isSupported.blob(),
- errorCode: 'window.Blob',
- errorMsg: 'The window.Blob File API is not supported in your browser'
- }, {
- condition: utils.isSupported.Uint8Array(),
- errorCode: 'window.Uint8Array',
- errorMsg: 'The window.Uint8Array function constructor is not supported in your browser'
- }, {
- condition: utils.isSupported.Uint32Array(),
- errorCode: 'window.Uint32Array',
- errorMsg: 'The window.Uint32Array function constructor is not supported in your browser'
- }],
- messages: {
- videoCodecs: {
- errorCode: 'videocodec',
- errorMsg: 'The video codec you are trying to use is not supported in your browser'
- }
- }
- };
-
-
-
- var error$2 = Object.freeze({
- default: error
- });
-
- /*
- defaultOptions.js
- =================
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- // Helpers
- var noop = function noop() {};
-
- var defaultOptions = {
- sampleInterval: 10,
- numWorkers: 2,
- filter: '',
- gifWidth: 200,
- gifHeight: 200,
- interval: 0.1,
- numFrames: 10,
- frameDuration: 1,
- keepCameraOn: false,
- images: [],
- video: null,
- webcamVideoElement: null,
- cameraStream: null,
- text: '',
- fontWeight: 'normal',
- fontSize: '16px',
- minFontSize: '10px',
- resizeFont: false,
- fontFamily: 'sans-serif',
- fontColor: '#ffffff',
- textAlign: 'center',
- textBaseline: 'bottom',
- textXCoordinate: null,
- textYCoordinate: null,
- progressCallback: noop,
- completeCallback: noop,
- saveRenderingContexts: false,
- savedRenderingContexts: [],
- crossOrigin: 'Anonymous'
- };
-
-
-
- var defaultOptions$2 = Object.freeze({
- default: defaultOptions
- });
-
- /*
- isSupported.js
- ==============
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- // Dependencies
- function isSupported() {
- return error.isValid();
- }
-
- /*
- isWebCamGIFSupported.js
- =======================
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- function isWebCamGIFSupported() {
- return error.isValid();
- }
-
- /*
- isSupported.js
- ==============
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- // Dependencies
- function isSupported$1() {
- var options = {
- getUserMedia: true
- };
-
- return error.isValid(options);
- }
-
- /*
- isExistingVideoGIFSupported.js
- ==============================
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- // Dependencies
- function isExistingVideoGIFSupported(codecs) {
- var hasValidCodec = false;
-
- if (utils.isArray(codecs) && codecs.length) {
- utils.each(codecs, function (indece, currentCodec) {
- if (utils.isSupported.videoCodecs[currentCodec]) {
- hasValidCodec = true;
- }
- });
-
- if (!hasValidCodec) {
- return false;
- }
- } else if (utils.isString(codecs) && codecs.length) {
- if (!utils.isSupported.videoCodecs[codecs]) {
- return false;
- }
- }
-
- return error.isValid({
- 'getUserMedia': true
- });
- }
-
- /*
- NeuQuant.js
- ===========
- */
-
- /*
- * NeuQuant Neural-Net Quantization Algorithm
- * ------------------------------------------
- *
- * Copyright (c) 1994 Anthony Dekker
- *
- * NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. See
- * "Kohonen neural networks for optimal colour quantization" in "Network:
- * Computation in Neural Systems" Vol. 5 (1994) pp 351-367. for a discussion of
- * the algorithm.
- *
- * Any party obtaining a copy of these files from the author, directly or
- * indirectly, is granted, free of charge, a full and unrestricted irrevocable,
- * world-wide, paid up, royalty-free, nonexclusive right and license to deal in
- * this software and documentation files (the "Software"), including without
- * limitation the rights to use, copy, modify, merge, publish, distribute,
- * sublicense, and/or sell copies of the Software, and to permit persons who
- * receive copies from any such party to do so, with the only requirement being
- * that this copyright notice remain intact.
- */
-
- /*
- * This class handles Neural-Net quantization algorithm
- * @author Kevin Weiner (original Java version - kweiner@fmsware.com)
- * @author Thibault Imbert (AS3 version - bytearray.org)
- * @version 0.1 AS3 implementation
- * @version 0.2 JS->AS3 "translation" by antimatter15
- * @version 0.3 JS clean up + using modern JS idioms by sole - http://soledadpenades.com
- * Also implement fix in color conversion described at http://stackoverflow.com/questions/16371712/neuquant-js-javascript-color-quantization-hidden-bug-in-js-conversion
- */
-
- function NeuQuant() {
- var netsize = 256; // number of colours used
-
- // four primes near 500 - assume no image has a length so large
- // that it is divisible by all four primes
- var prime1 = 499;
- var prime2 = 491;
- var prime3 = 487;
- var prime4 = 503;
-
- // minimum size for input image
- var minpicturebytes = 3 * prime4;
-
- // Network Definitions
-
- var maxnetpos = netsize - 1;
- var netbiasshift = 4; // bias for colour values
- var ncycles = 100; // no. of learning cycles
-
- // defs for freq and bias
- var intbiasshift = 16; // bias for fractions
- var intbias = 1 << intbiasshift;
- var gammashift = 10; // gamma = 1024
- var betashift = 10;
- var beta = intbias >> betashift; // beta = 1/1024
- var betagamma = intbias << gammashift - betashift;
-
- // defs for decreasing radius factor
- // For 256 colors, radius starts at 32.0 biased by 6 bits
- // and decreases by a factor of 1/30 each cycle
- var initrad = netsize >> 3;
- var radiusbiasshift = 6;
- var radiusbias = 1 << radiusbiasshift;
- var initradius = initrad * radiusbias;
- var radiusdec = 30;
-
- // defs for decreasing alpha factor
- // Alpha starts at 1.0 biased by 10 bits
- var alphabiasshift = 10;
- var initalpha = 1 << alphabiasshift;
- var alphadec;
-
- // radbias and alpharadbias used for radpower calculation
- var radbiasshift = 8;
- var radbias = 1 << radbiasshift;
- var alpharadbshift = alphabiasshift + radbiasshift;
- var alpharadbias = 1 << alpharadbshift;
-
- // Input image
- var thepicture;
- // Height * Width * 3
- var lengthcount;
- // Sampling factor 1..30
- var samplefac;
-
- // The network itself
- var network;
- var netindex = [];
-
- // for network lookup - really 256
- var bias = [];
-
- // bias and freq arrays for learning
- var freq = [];
- var radpower = [];
-
- function NeuQuantConstructor(thepic, len, sample) {
-
- var i;
- var p;
-
- thepicture = thepic;
- lengthcount = len;
- samplefac = sample;
-
- network = new Array(netsize);
-
- for (i = 0; i < netsize; i++) {
- network[i] = new Array(4);
- p = network[i];
- p[0] = p[1] = p[2] = (i << netbiasshift + 8) / netsize | 0;
- freq[i] = intbias / netsize | 0; // 1 / netsize
- bias[i] = 0;
- }
- }
-
- function colorMap() {
- var map = [];
- var index = new Array(netsize);
- for (var i = 0; i < netsize; i++) {
- index[network[i][3]] = i;
- }var k = 0;
- for (var l = 0; l < netsize; l++) {
- var j = index[l];
- map[k++] = network[j][0];
- map[k++] = network[j][1];
- map[k++] = network[j][2];
- }
- return map;
- }
-
- // Insertion sort of network and building of netindex[0..255]
- // (to do after unbias)
- function inxbuild() {
- var i;
- var j;
- var smallpos;
- var smallval;
- var p;
- var q;
- var previouscol;
- var startpos;
-
- previouscol = 0;
- startpos = 0;
-
- for (i = 0; i < netsize; i++) {
-
- p = network[i];
- smallpos = i;
- smallval = p[1]; // index on g
- // find smallest in i..netsize-1
- for (j = i + 1; j < netsize; j++) {
-
- q = network[j];
-
- if (q[1] < smallval) {
- // index on g
- smallpos = j;
- smallval = q[1]; // index on g
- }
- }
-
- q = network[smallpos];
-
- // swap p (i) and q (smallpos) entries
- if (i != smallpos) {
- j = q[0];
- q[0] = p[0];
- p[0] = j;
- j = q[1];
- q[1] = p[1];
- p[1] = j;
- j = q[2];
- q[2] = p[2];
- p[2] = j;
- j = q[3];
- q[3] = p[3];
- p[3] = j;
- }
-
- // smallval entry is now in position i
- if (smallval != previouscol) {
-
- netindex[previouscol] = startpos + i >> 1;
-
- for (j = previouscol + 1; j < smallval; j++) {
- netindex[j] = i;
- }
-
- previouscol = smallval;
- startpos = i;
- }
- }
-
- netindex[previouscol] = startpos + maxnetpos >> 1;
- for (j = previouscol + 1; j < 256; j++) {
- netindex[j] = maxnetpos; // really 256
- }
- }
-
- // Main Learning Loop
-
- function learn() {
- var i;
- var j;
- var b;
- var g;
- var r;
- var radius;
- var rad;
- var alpha;
- var step;
- var delta;
- var samplepixels;
- var p;
- var pix;
- var lim;
-
- if (lengthcount < minpicturebytes) {
- samplefac = 1;
- }
-
- alphadec = 30 + (samplefac - 1) / 3;
- p = thepicture;
- pix = 0;
- lim = lengthcount;
- samplepixels = lengthcount / (3 * samplefac);
- delta = samplepixels / ncycles | 0;
- alpha = initalpha;
- radius = initradius;
-
- rad = radius >> radiusbiasshift;
- if (rad <= 1) {
- rad = 0;
- }
-
- for (i = 0; i < rad; i++) {
- radpower[i] = alpha * ((rad * rad - i * i) * radbias / (rad * rad));
- }
-
- if (lengthcount < minpicturebytes) {
- step = 3;
- } else if (lengthcount % prime1 !== 0) {
- step = 3 * prime1;
- } else {
-
- if (lengthcount % prime2 !== 0) {
- step = 3 * prime2;
- } else {
- if (lengthcount % prime3 !== 0) {
- step = 3 * prime3;
- } else {
- step = 3 * prime4;
- }
- }
- }
-
- i = 0;
-
- while (i < samplepixels) {
-
- b = (p[pix + 0] & 0xff) << netbiasshift;
- g = (p[pix + 1] & 0xff) << netbiasshift;
- r = (p[pix + 2] & 0xff) << netbiasshift;
- j = contest(b, g, r);
-
- altersingle(alpha, j, b, g, r);
-
- if (rad !== 0) {
- // Alter neighbours
- alterneigh(rad, j, b, g, r);
- }
-
- pix += step;
-
- if (pix >= lim) {
- pix -= lengthcount;
- }
-
- i++;
-
- if (delta === 0) {
- delta = 1;
- }
-
- if (i % delta === 0) {
- alpha -= alpha / alphadec;
- radius -= radius / radiusdec;
- rad = radius >> radiusbiasshift;
-
- if (rad <= 1) {
- rad = 0;
- }
-
- for (j = 0; j < rad; j++) {
- radpower[j] = alpha * ((rad * rad - j * j) * radbias / (rad * rad));
- }
- }
- }
- }
-
- // Search for BGR values 0..255 (after net is unbiased) and return colour index
- function map(b, g, r) {
- var i;
- var j;
- var dist;
- var a;
- var bestd;
- var p;
- var best;
-
- // Biggest possible distance is 256 * 3
- bestd = 1000;
- best = -1;
- i = netindex[g]; // index on g
- j = i - 1; // start at netindex[g] and work outwards
-
- while (i < netsize || j >= 0) {
-
- if (i < netsize) {
-
- p = network[i];
-
- dist = p[1] - g; // inx key
-
- if (dist >= bestd) {
- i = netsize; // stop iter
- } else {
-
- i++;
-
- if (dist < 0) {
- dist = -dist;
- }
-
- a = p[0] - b;
-
- if (a < 0) {
- a = -a;
- }
-
- dist += a;
-
- if (dist < bestd) {
- a = p[2] - r;
-
- if (a < 0) {
- a = -a;
- }
-
- dist += a;
-
- if (dist < bestd) {
- bestd = dist;
- best = p[3];
- }
- }
- }
- }
-
- if (j >= 0) {
-
- p = network[j];
-
- dist = g - p[1]; // inx key - reverse dif
-
- if (dist >= bestd) {
- j = -1; // stop iter
- } else {
-
- j--;
- if (dist < 0) {
- dist = -dist;
- }
- a = p[0] - b;
- if (a < 0) {
- a = -a;
- }
- dist += a;
-
- if (dist < bestd) {
- a = p[2] - r;
- if (a < 0) {
- a = -a;
- }
- dist += a;
- if (dist < bestd) {
- bestd = dist;
- best = p[3];
- }
- }
- }
- }
- }
-
- return best;
- }
-
- function process() {
- learn();
- unbiasnet();
- inxbuild();
- return colorMap();
- }
-
- // Unbias network to give byte values 0..255 and record position i
- // to prepare for sort
- function unbiasnet() {
- var i;
-
- for (i = 0; i < netsize; i++) {
- network[i][0] >>= netbiasshift;
- network[i][1] >>= netbiasshift;
- network[i][2] >>= netbiasshift;
- network[i][3] = i; // record colour no
- }
- }
-
- // Move adjacent neurons by precomputed alpha*(1-((i-j)^2/[r]^2))
- // in radpower[|i-j|]
- function alterneigh(rad, i, b, g, r) {
-
- var j;
- var k;
- var lo;
- var hi;
- var a;
- var m;
-
- var p;
-
- lo = i - rad;
- if (lo < -1) {
- lo = -1;
- }
-
- hi = i + rad;
-
- if (hi > netsize) {
- hi = netsize;
- }
-
- j = i + 1;
- k = i - 1;
- m = 1;
-
- while (j < hi || k > lo) {
-
- a = radpower[m++];
-
- if (j < hi) {
-
- p = network[j++];
-
- try {
-
- p[0] -= a * (p[0] - b) / alpharadbias | 0;
- p[1] -= a * (p[1] - g) / alpharadbias | 0;
- p[2] -= a * (p[2] - r) / alpharadbias | 0;
- } catch (e) {}
- }
-
- if (k > lo) {
-
- p = network[k--];
-
- try {
-
- p[0] -= a * (p[0] - b) / alpharadbias | 0;
- p[1] -= a * (p[1] - g) / alpharadbias | 0;
- p[2] -= a * (p[2] - r) / alpharadbias | 0;
- } catch (e) {}
- }
- }
- }
-
- // Move neuron i towards biased (b,g,r) by factor alpha
- function altersingle(alpha, i, b, g, r) {
-
- // alter hit neuron
- var n = network[i];
- var alphaMult = alpha / initalpha;
- n[0] -= alphaMult * (n[0] - b) | 0;
- n[1] -= alphaMult * (n[1] - g) | 0;
- n[2] -= alphaMult * (n[2] - r) | 0;
- }
-
- // Search for biased BGR values
- function contest(b, g, r) {
-
- // finds closest neuron (min dist) and updates freq
- // finds best neuron (min dist-bias) and returns position
- // for frequently chosen neurons, freq[i] is high and bias[i] is negative
- // bias[i] = gamma*((1/netsize)-freq[i])
-
- var i;
- var dist;
- var a;
- var biasdist;
- var betafreq;
- var bestpos;
- var bestbiaspos;
- var bestd;
- var bestbiasd;
- var n;
-
- bestd = ~(1 << 31);
- bestbiasd = bestd;
- bestpos = -1;
- bestbiaspos = bestpos;
-
- for (i = 0; i < netsize; i++) {
-
- n = network[i];
- dist = n[0] - b;
-
- if (dist < 0) {
- dist = -dist;
- }
-
- a = n[1] - g;
-
- if (a < 0) {
- a = -a;
- }
-
- dist += a;
-
- a = n[2] - r;
-
- if (a < 0) {
- a = -a;
- }
-
- dist += a;
-
- if (dist < bestd) {
- bestd = dist;
- bestpos = i;
- }
-
- biasdist = dist - (bias[i] >> intbiasshift - netbiasshift);
-
- if (biasdist < bestbiasd) {
- bestbiasd = biasdist;
- bestbiaspos = i;
- }
-
- betafreq = freq[i] >> betashift;
- freq[i] -= betafreq;
- bias[i] += betafreq << gammashift;
- }
-
- freq[bestpos] += beta;
- bias[bestpos] -= betagamma;
- return bestbiaspos;
- }
-
- NeuQuantConstructor.apply(this, arguments);
-
- var exports = {};
- exports.map = map;
- exports.process = process;
-
- return exports;
- }
-
- /*
- processFrameWorker.js
- =====================
- */
-
- /* Copyright 2017 Yahoo Inc.
- * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
- */
-
- function workerCode() {
- var self = this;
-
- try {
- self.onmessage = function (ev) {
- var data = ev.data || {};
- var response;
-
- if (data.gifshot) {
- response = workerMethods.run(data);
- postMessage(response);
- }
- };
- } catch (e) {}
-
- var workerMethods = {
- dataToRGB: function dataToRGB(data, width, height) {
- var length = width * height * 4;
- var i = 0;
- var rgb = [];
-
- while (i < length) {
- rgb.push(data[i++]);
- rgb.push(data[i++]);
- rgb.push(data[i++]);
- i++; // for the alpha channel which we don't care about
- }
-
- return rgb;
- },
- componentizedPaletteToArray: function componentizedPaletteToArray(paletteRGB) {
- paletteRGB = paletteRGB || [];
-
- var paletteArray = [];
-
- for (var i = 0; i < paletteRGB.length; i += 3) {
- var r = paletteRGB[i];
- var g = paletteRGB[i + 1];
- var b = paletteRGB[i + 2];
-
- paletteArray.push(r << 16 | g << 8 | b);
- }
-
- return paletteArray;
- },
- // This is the "traditional" Animated_GIF style of going from RGBA to indexed color frames
- 'processFrameWithQuantizer': function processFrameWithQuantizer(imageData, width, height, sampleInterval) {
- var rgbComponents = this.dataToRGB(imageData, width, height);
- var nq = new NeuQuant(rgbComponents, rgbComponents.length, sampleInterval);
- var paletteRGB = nq.process();
- var paletteArray = new Uint32Array(this.componentizedPaletteToArray(paletteRGB));
- var numberPixels = width * height;
- var indexedPixels = new Uint8Array(numberPixels);
- var k = 0;
-
- for (var i = 0; i < numberPixels; i++) {
- var r = rgbComponents[k++];
- var g = rgbComponents[k++];
- var b = rgbComponents[k++];
-
- indexedPixels[i] = nq.map(r, g, b);
- }
-
- return {
- pixels: indexedPixels,
- palette: paletteArray
- };
- },
- 'run': function run(frame) {
- frame = frame || {};
-
- var _frame = frame,
- height = _frame.height,
- palette = _frame.palette,
- sampleInterval = _frame.sampleInterval,
- width = _frame.width;
-
- var imageData = frame.data;
-
- return this.processFrameWithQuantizer(imageData, width, height, sampleInterval);
- }
- };
-
- return workerMethods;
- }
-
- /*
- gifWriter.js
- ============
- */
-
- // (c) Dean McNamee `,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ right: '20px',
+ opacity: '.9',
+ },
+ },
+ {
+ html: `
`,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ left: '20px',
+ opacity: '.9',
+ },
+ },
+ ],
+});
+
+art.on('ready', () => {
+ setTimeout(() => {
+ art.layers.show = false;
+ }, 3000);
+});
+```
+
+Method `add` can dynamically add a layer
+
+| Property | Type | Description |
+| --------- | ------------------- | ------------------------------------------------------------- |
+| `disable` | `Boolean` | Whether to disable the component |
+| `name` | `String` | The unique name of the component, used to mark the class name |
+| `index` | `Number` | Component index, priority for display |
+| `html` | `String`、`Element` | DOM element of the component |
+| `style` | `Object` | Component style object |
+| `click` | `Function` | Component click event |
+| `mounted` | `Function` | Triggered after the component is mounted |
+| `tooltip` | `String` | Prompt text of the component |
+
+
`,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ right: '20px',
+ opacity: '.9',
+ },
+ });
+ }, 3000);
+});
+```
+
+## notice
+
+- Type: `Object`
+
+Manage the object of prompt information
+
+Attribute `show` output custom prompt information, the default residence time is two seconds, and the new information will immediately cover the old information
+
+
`,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ right: '20px',
+ opacity: '.9',
+ },
+ click: function (...args) {
+ console.info('You click on the component');
+ art.layers.show = false;
+ },
+ mounted: function (...args) {
+ console.info('Component mount completion');
+ },
+ },
+ ],
+});
+```
+
+## contextmenu
+
+- Type: `Array`
+- Default: `[]`
+
+Initialize custom contextmenu
+
+| Property | Type | Description |
+| --------- | ------------------- | ------------------------------------------------------------- |
+| `disable` | `Boolean` | Whether to disable the component |
+| `name` | `String` | The unique name of the component, used to mark the class name |
+| `index` | `Number` | Component index, priority for display |
+| `html` | `String`、`Element` | DOM element of the component |
+| `style` | `Object` | Component style object |
+| `click` | `Function` | Component click event |
+| `mounted` | `Function` | Triggered after the component is mounted |
+| `tooltip` | `String` | Prompt text of the component |
+
+
',
+ state: '
',
+ play: '',
+ pause: '',
+ volume: '',
+ volumeClose: '',
+ subtitle: '',
+ screenshot: '',
+ setting: '',
+ fullscreen: '',
+ fullscreenWeb: '',
+ pip: '',
+ },
+});
+```
+
+## type
+
+- Type: `String`
+- Default: `''`
+
+Used to specify the format of the video, you need to use the CustomType to use, please visit [Libraries](/document/libraries)
+
+The default video format is the suffix of video addresses (such as .flv,.mkv, .ts), but sometimes video address does not have the correct suffix, so it is necessary to specify
+
+`,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ right: '20px',
+ opacity: '.9',
+ },
+ },
+ {
+ html: `
`,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ left: '20px',
+ opacity: '.9',
+ },
+ },
+ ],
+});
+
+art.on('ready', () => {
+ setTimeout(() => {
+ art.layers.show = false;
+ }, 3000);
+});
+```
+
+方法 `add` 可以动态添加业务层
+
+| 属性 | 类型 | 描述 |
+| --------- | ------------------- | -------------------------- |
+| `disable` | `Boolean` | 是否禁用组件 |
+| `name` | `String` | 组件唯一名称,用于标记类名 |
+| `index` | `Number` | 组件索引,用于显示的优先级 |
+| `html` | `String`、`Element` | 组件的 DOM 元素 |
+| `style` | `Object` | 组件样式对象 |
+| `click` | `Function` | 组件点击事件 |
+| `mounted` | `Function` | 组件挂载后触发 |
+| `tooltip` | `String` | 组件的提示文本 |
+
+
`,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ right: '20px',
+ opacity: '.9',
+ },
+ });
+ }, 3000);
+});
+```
+
+## notice
+
+- 类型: `Object`
+
+管理提示信息的对象
+
+属性 `show` 输出自定义提示信息,默认停留时间为两秒,且新的信息会马上覆盖旧的信息
+
+
`,
+ style: {
+ position: 'absolute',
+ top: '20px',
+ right: '20px',
+ opacity: '.9',
+ },
+ click: function (...args) {
+ console.info('你点击了组件');
+ art.layers.show = false;
+ },
+ mounted: function (...args) {
+ console.info('组件挂载完成');
+ },
+ },
+ ],
+});
+```
+
+## contextmenu
+
+- 类型: `Array`
+- 默认: `[]`
+
+初始化自定义的右键菜单
+
+| 属性 | 类型 | 描述 |
+| --------- | ------------------- | -------------------------- |
+| `disable` | `Boolean` | 是否禁用组件 |
+| `name` | `String` | 组件唯一名称,用于标记类名 |
+| `index` | `Number` | 组件索引,用于显示的优先级 |
+| `html` | `String`、`Element` | 组件的 DOM 元素 |
+| `style` | `Object` | 组件样式对象 |
+| `click` | `Function` | 组件点击事件 |
+| `mounted` | `Function` | 组件挂载后触发 |
+| `tooltip` | `String` | 组件的提示文本 |
+
+
',
+ state: '
',
+ play: '',
+ pause: '',
+ volume: '',
+ volumeClose: '',
+ subtitle: '',
+ screenshot: '',
+ setting: '',
+ fullscreen: '',
+ fullscreenWeb: '',
+ pip: '',
+ },
+});
+```
+
+## type
+
+- 类型: `String`
+- 默认: `''`
+
+用于指明视频的格式,需要配合 `customType` 一起使用,更多信息请访问 [第三方库](/document/zh-cn/libraries)
+
+默认视频的格式就是视频地址的后缀(如 `.flv`、`.mkv`、`.ts`),但有时候视频地地址没有正确的后缀,所以需要特别指明
+
+
Keywords: ' + doc.keywords.substring(0, start) + '' + doc.keywords.substring(start, end) + '' + doc.keywords.substring(end, doc.keywords.length) + ''
+ return this.getHit(doc, formattedTitle)
+ }
+
+ getContentHit(doc, position) {
+ const start = position[0];
+ const end = position[0] + position[1];
+ let previewStart = start;
+ let previewEnd = end;
+ let ellipsesBefore = true;
+ let ellipsesAfter = true;
+ for (let k = 0; k < 3; k++) {
+ const nextSpace = doc.content.lastIndexOf(' ', previewStart - 2);
+ const nextDot = doc.content.lastIndexOf('.', previewStart - 2);
+ if ((nextDot > 0) && (nextDot > nextSpace)) {
+ previewStart = nextDot + 1;
+ ellipsesBefore = false;
+ break;
+ }
+ if (nextSpace < 0) {
+ previewStart = 0;
+ ellipsesBefore = false;
+ break;
+ }
+ previewStart = nextSpace + 1;
+ }
+ for (let k = 0; k < 10; k++) {
+ const nextSpace = doc.content.indexOf(' ', previewEnd + 1);
+ const nextDot = doc.content.indexOf('.', previewEnd + 1);
+ if ((nextDot > 0) && (nextDot < nextSpace)) {
+ previewEnd = nextDot;
+ ellipsesAfter = false;
+ break;
+ }
+ if (nextSpace < 0) {
+ previewEnd = doc.content.length;
+ ellipsesAfter = false;
+ break;
+ }
+ previewEnd = nextSpace;
+ }
+ let preview = doc.content.substring(previewStart, start);
+ if (ellipsesBefore) {
+ preview = '... ' + preview;
+ }
+ preview += '' + doc.content.substring(start, end) + '';
+ preview += doc.content.substring(end, previewEnd);
+ if (ellipsesAfter) {
+ preview += ' ...';
+ }
+ return this.getHit(doc, null, preview);
+
+ }
+ search(input) {
+ return new Promise((resolve, rej) => {
+ const results = this.getLunrResult(input);
+ const hits = [];
+ results.length > 5 && (results.length = 5);
+ this.titleHitsRes = []
+ this.contentHitsRes = []
+ results.forEach(result => {
+ const doc = this.searchDocs[result.ref];
+ const { metadata } = result.matchData;
+ for (let i in metadata) {
+ if (metadata[i].title) {
+ if (!this.titleHitsRes.includes(result.ref)) {
+ const position = metadata[i].title.position[0]
+ hits.push(this.getTitleHit(doc, position, input.length));
+ this.titleHitsRes.push(result.ref);
+ }
+ } else if (metadata[i].content) {
+ const position = metadata[i].content.position[0]
+ hits.push(this.getContentHit(doc, position))
+ } else if (metadata[i].keywords) {
+ const position = metadata[i].keywords.position[0]
+ hits.push(this.getKeywordHit(doc, position, input.length));
+ this.titleHitsRes.push(result.ref);
+ }
+ }
+ });
+ hits.length > 5 && (hits.length = 5);
+ resolve(hits);
+ });
+ }
+}
+
+export default LunrSearchAdapter;
diff --git a/packages/artplayer-document/src/theme/SearchBar/lib/templates.js b/packages/artplayer-document/src/theme/SearchBar/lib/templates.js
new file mode 100644
index 000000000..c7ea998fd
--- /dev/null
+++ b/packages/artplayer-document/src/theme/SearchBar/lib/templates.js
@@ -0,0 +1,114 @@
+const prefix = 'algolia-docsearch';
+const suggestionPrefix = `${prefix}-suggestion`;
+const footerPrefix = `${prefix}-footer`;
+
+/* eslint-disable max-len */
+
+const templates = {
+ suggestion: `
+
+ >1,t=c+1;t