rtlcss_wrapper 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: aa15c150dfda7e903f4f9b67258c88d1676b126dd46cac688804382df8fd8384
4
+ data.tar.gz: c002d8a4680a137b87669ef108539fa3cbc39171bf85fab42449a58562861b78
5
+ SHA512:
6
+ metadata.gz: a806c9b99193b66d5431c0311408253033bf01884a779e263a1052fd2ae3e2fb972b5c8157223f4e7524a6f0da04f4a03d5174bd613f4e170d56c1c476a81d9b
7
+ data.tar.gz: b021852e033a489af35026f6a4936ba05c37dff860fef8307ba69ae287f1556d7e1fbebf193a209a98e566fb785a9d68ac65470608abbb798054159aea3cef1a
data/.rubocop.yml ADDED
@@ -0,0 +1,7 @@
1
+ inherit_gem:
2
+ rubocop-discourse: default.yml
3
+ inherit_mode:
4
+ merge:
5
+ - Exclude
6
+ Discourse/NoChdir:
7
+ Enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-02-01
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at asooomaasoooma90@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in rtlcss_wrapper.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 OsamaSayegh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # RtlcssWrapper
2
+
3
+ A wrapper gem for the `rtlcss` [npm package](https://www.npmjs.com/package/rtlcss) to flip CSS direction in ruby. For example, given the following CSS that's designed to work with LTR (Left To Right) layouts:
4
+
5
+ ```css
6
+ a {
7
+ left: 5px;
8
+ padding-right: 5px;
9
+ margin: 1px 2px 3px 4px;
10
+ }
11
+ ```
12
+
13
+ You can use this gem to produce the following CSS which is suitable for RTL (Right To Left) layouts:
14
+
15
+ ```css
16
+ a {
17
+ right: 5px;
18
+ padding-left: 5px;
19
+ margin: 1px 4px 3px 2px;
20
+ }
21
+ ```
22
+
23
+ This gem uses [`mini_racer`](https://github.com/rubyjs/mini_racer) to call the `rtlcss` npm package.
24
+
25
+ ## Installation
26
+
27
+ Install the gem and add to the application's Gemfile by executing:
28
+
29
+ $ bundle add rtlcss_wrapper
30
+
31
+ If bundler is not being used to manage dependencies, install the gem by executing:
32
+
33
+ $ gem install rtlcss_wrapper
34
+
35
+ ## Usage
36
+
37
+ ```ruby
38
+ require "rtlcss_wrapper"
39
+
40
+ RtlcssWrapper.flip_css("a { right: 1px; }") # => "a { left: 1px; }"
41
+ ```
42
+
43
+ Syntactically-broken CSS will raise a `RtlcssWrapper::FlipError` exception.
44
+
45
+ ## Development
46
+
47
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
48
+
49
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
50
+
51
+ Instructions for updating the distributed copy of `rtlcss` that's included with this gem (i.e. the `dist/main.js` file) can be found in the README in the `rtlcss-miniracer` directory.
52
+
53
+ ## Contributing
54
+
55
+ Bug reports and pull requests are welcome on GitHub at https://github.com/discourse/rtlcss_wrapper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/discourse/rtlcss_wrapper/blob/main/CODE_OF_CONDUCT.md).
56
+
57
+ ## License
58
+
59
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
60
+
61
+ ## Code of Conduct
62
+
63
+ Everyone interacting in the RtlcssWrapper project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/discourse/rtlcss_wrapper/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
data/dist/main.js ADDED
@@ -0,0 +1 @@
1
+ var rtlcss,__webpack_modules__={241:e=>{var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=r(),e.exports.createColors=r},353:(e,t,r)=>{"use strict";let s=r(19);class i extends s{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,s.registerAtRule(i)},932:(e,t,r)=>{"use strict";let s=r(631);class i extends s{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},19:(e,t,r)=>{"use strict";let s,i,n,o,{isClean:a,my:l}=r(513),c=r(258),u=r(932),h=r(631);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function f(e){if(e[a]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)f(t)}class d extends h{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}walk(e){return this.each(((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)})):this.walk(((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)})):this.walk(((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)})):this.walk(((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let r,s=this.index(e),i=0===s&&"prepend",n=this.normalize(t,this.proxyOf.nodes[s],i).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertAfter(e,t){let r,s=this.index(e),i=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))})),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if("string"==typeof e)e=p(s(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new i(e)];else if(e.name)e=[new n(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new u(e)]}return e.map((e=>(e[l]||d.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[a]&&f(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}getProxyProcessor(){return{set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}d.registerParse=e=>{s=e},d.registerRule=e=>{i=e},d.registerAtRule=e=>{n=e},d.registerRoot=e=>{o=e},e.exports=d,d.default=d,d.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,o.prototype),e[l]=!0,e.nodes&&e.nodes.forEach((e=>{d.rebuild(e)}))}},671:(e,t,r)=>{"use strict";let s=r(241),i=r(868);class n extends Error{constructor(e,t,r,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=s.isColorSupported),i&&e&&(t=i(t));let r,n,o=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),c=String(l).length;if(e){let{bold:e,red:t,gray:i}=s.createColors(!0);r=r=>e(t(r)),n=e=>i(e)}else r=n=e=>e;return o.slice(a,l).map(((e,t)=>{let s=a+1+t,i=" "+(" "+s).slice(-c)+" | ";if(s===this.line){let t=n(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(i)+e+"\n "+t+r("^")}return" "+n(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=n,n.default=n},258:(e,t,r)=>{"use strict";let s=r(631);class i extends s{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=i,i.default=i},461:(e,t,r)=>{"use strict";let s,i,n=r(19);class o extends n{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new s(new i,this,e).stringify()}}o.registerLazyResult=e=>{s=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o},250:(e,t,r)=>{"use strict";let s=r(258),i=r(981),n=r(932),o=r(353),a=r(995),l=r(25),c=r(675);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:r,...h}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:a.prototype};r.map&&(r.map={...r.map,__proto__:i.prototype}),t.push(r)}}if(h.nodes&&(h.nodes=e.nodes.map((e=>u(e,t)))),h.source){let{inputId:e,...r}=h.source;h.source=r,null!=e&&(h.source.input=t[e])}if("root"===h.type)return new l(h);if("decl"===h.type)return new s(h);if("rule"===h.type)return new c(h);if("comment"===h.type)return new n(h);if("atrule"===h.type)return new o(h);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},995:(e,t,r)=>{"use strict";let{SourceMapConsumer:s,SourceMapGenerator:i}=r(209),{fileURLToPath:n,pathToFileURL:o}=r(414),{resolve:a,isAbsolute:l}=r(830),{nanoid:c}=r(961),u=r(868),h=r(671),p=r(981),f=Symbol("fromOffsetCache"),d=Boolean(s&&i),m=Boolean(a&&l);class g{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||l(t.from)?this.file=t.from:this.file=a(t.from)),m&&d){let e=new p(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}fromOffset(e){let t,r;if(this[f])r=this[f];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,i=e.length;s<i;s++)r[s]=t,t+=e[s].length+1;this[f]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,i=r.length-2;for(;s<i;)if(t=s+(i-s>>1),e<r[t])i=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{line:s+1,col:e-r[s]+1}}error(e,t,r,s={}){let i,n,a;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);n=e.line,a=e.col}else n=s.line,a=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let l=this.origin(t,r,n,a);return i=l?new h(e,void 0===l.endLine?l.line:{line:l.line,column:l.column},void 0===l.endLine?l.column:{line:l.endLine,column:l.endColumn},l.source,l.file,s.plugin):new h(e,void 0===n?t:{line:t,column:r},void 0===n?r:{line:n,column:a},this.css,this.file,s.plugin),i.input={line:t,column:r,endLine:n,endColumn:a,source:this.css},this.file&&(o&&(i.input.url=o(this.file).toString()),i.input.file=this.file),i}origin(e,t,r,s){if(!this.map)return!1;let i,a,c=this.map.consumer(),u=c.originalPositionFor({line:e,column:t});if(!u.source)return!1;"number"==typeof r&&(i=c.originalPositionFor({line:r,column:s})),a=l(u.source)?o(u.source):new URL(u.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let h={url:a.toString(),line:u.line,column:u.column,endLine:i&&i.line,endColumn:i&&i.column};if("file:"===a.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");h.file=n(a)}let p=c.sourceContentFor(u.source);return p&&(h.source=p),h}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=g,g.default=g,u&&u.registerInput&&u.registerInput(g)},939:(e,t,r)=>{"use strict";let{isClean:s,my:i}=r(513),n=r(505),o=r(88),a=r(19),l=r(461),c=(r(448),r(632)),u=r(964),h=r(25);const p={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},f={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},d={postcssPlugin:!0,prepare:!0,Once:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function g(e){let t=!1,r=p[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function w(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:g(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function y(e){return e[s]=!1,e.nodes&&e.nodes.forEach((e=>y(e))),e}let x={};class v{constructor(e,t,r){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof v||t instanceof c)s=y(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=u;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{s=e(t,r)}catch(e){this.processed=!0,this.error=e}s&&!s[i]&&a.rebuild(s)}else s=y(t);this.result=new c(e,s,r),this.helpers={...x,result:this.result,postcss:x},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(m(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[s];)e[s]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=o;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new n(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}walkSync(e){e[s]=!0;let t=g(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[s]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(m(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[s];){e[s]=!0;let t=[w(e)];for(;t.length>0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!f[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(i.length>0&&t.visitorIndex<i.length){let[e,s]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return s(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let i,n=t.iterator;for(;i=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!i[s])return i[s]=!0,void e.push(w(i));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[s]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}v.registerPostcss=e=>{x=e},e.exports=v,v.default=v,h.registerLazyResult(v),l.registerLazyResult(v)},715:e=>{"use strict";let t={split(e,t,r){let s=[],i="",n=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(n=!0),n?(""!==i&&s.push(i.trim()),i="",n=!1):i+=r;return(r||""!==i)&&s.push(i.trim()),s},space:e=>t.split(e,[" ","\n","\t"]),comma:e=>t.split(e,[","],!0)};e.exports=t,t.default=t},505:(e,t,r)=>{"use strict";let{SourceMapConsumer:s,SourceMapGenerator:i}=r(209),{dirname:n,resolve:o,relative:a,sep:l}=r(830),{pathToFileURL:c}=r(414),u=r(995),h=Boolean(s&&i),p=Boolean(n&&o&&a&&l);e.exports=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),i=e.root||n(e.file);!1===this.mapOpts.sourcesContent?(t=new s(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(i)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=i.fromSourceMap(e)}else this.map=new i({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?n(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=n(o(t,this.mapOpts.annotation))),a(t,e)}toUrl(e){return"\\"===l&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}toFileUrl(e){if(c)return c(e).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new i({file:this.outputFile()});let e,t,r=1,s=1,n="<no source>",o={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}}))}generate(){if(this.clearAnnotation(),p&&h&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}}},647:(e,t,r)=>{"use strict";let s=r(505),i=r(88),n=(r(448),r(964));const o=r(632);class a{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let a=i;this.result=new o(this._processor,n,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new s(a,n,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}get[Symbol.toStringTag](){return"NoWorkResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.result.css}get content(){return this.result.css}get map(){return this.result.map}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get messages(){return[]}warnings(){return[]}toString(){return this._css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}sync(){if(this.error)throw this.error;return this.result}}e.exports=a,a.default=a},631:(e,t,r)=>{"use strict";let{isClean:s,my:i}=r(513),n=r(671),o=r(62),a=r(88);function l(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let i=e[s],n=typeof i;"parent"===s&&"object"===n?t&&(r[s]=t):"source"===s?r[s]=i:Array.isArray(i)?r[s]=i.map((e=>l(e,r))):("object"===n&&null!==i&&(i=l(i)),r[s]=i)}return r}class c{constructor(e={}){this.raws={},this[s]=!1,this[i]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}error(e,t={}){if(this.source){let{start:r,end:s}=this.rangeBy(t);return this.source.input.error(e,{line:r.line,column:r.column},{line:s.line,column:s.column},t)}return new n(e)}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=a){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=l(this);for(let r in e)t[r]=e[r];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new o).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let r={},s=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let n=t.get(s.input);null==n&&(n=i,t.set(s.input,i),i++),r[e]={inputId:n,start:s.start,end:s.end}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}positionInside(e){let t=this.toString(),r=this.source.start.column,s=this.source.start.line;for(let i=0;i<e;i++)"\n"===t[i]?(r=1,s+=1):r+=1;return{line:s,column:r}}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r=this.toString().indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}rangeBy(e){let t={line:this.source.start.line,column:this.source.start.column},r=this.source.end?{line:this.source.end.line,column:this.source.end.column+1}:{line:t.line,column:t.column+1};if(e.word){let s=this.toString().indexOf(e.word);-1!==s&&(t=this.positionInside(s),r=this.positionInside(s+e.word.length))}else e.start?t={line:e.start.line,column:e.start.column}:e.index&&(t=this.positionInside(e.index)),e.end?r={line:e.end.line,column:e.end.column}:e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={line:t.line,column:t.column+1}),{start:t,end:r}}getProxyProcessor(){return{set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[s]){this[s]=!1;let e=this;for(;e=e.parent;)e[s]=!1}}get proxyOf(){return this}}e.exports=c,c.default=c},964:(e,t,r)=>{"use strict";let s=r(19),i=r(867),n=r(995);function o(e,t){let r=new n(e,t),s=new i(r);try{s.parse()}catch(e){throw e}return s.root}e.exports=o,o.default=o,s.registerParse(o)},867:(e,t,r)=>{"use strict";let s=r(258),i=r(852),n=r(932),o=r(353),a=r(25),l=r(675);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=i(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}other(e){let t=!1,r=null,s=!1,i=null,n=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),n.push("("===r?")":"]");else if(o&&s&&"{"===r)i||(i=l),n.push("}");else if(0===n.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===n[n.length-1]&&(n.pop(),0===n.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(i),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}decl(e,t){let r=new s;this.init(r,e[0][2]);let i,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e));"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(i=e.shift(),":"===i[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o,a=[];for(;e.length&&(o=e[0][0],"space"===o||"comment"===o);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(i=e[t],"!important"===i[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===i[1].toLowerCase()){let s=e.slice(0),i="";for(let e=t;e>0;e--){let t=s[e][0];if(0===i.trim().indexOf("!")&&"space"!==t)break;i=s.pop()[1]+i}0===i.trim().indexOf("!")&&(r.important=!0,r.raws.important=i,e=s)}if("space"!==i[0]&&"comment"!==i[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,r,s,i=new o;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let n=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(s=l.length-1,r=l[s];r&&"space"===r[0];)r=l[--s];r&&(i.source.end=this.getPosition(r[3]||r[2]))}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(i.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(i,"params",l),n&&(e=l[l.length-1],i.source.end=this.getPosition(e[3]||e[2]),this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}raw(e,t,r,s){let i,n,o,a,l=r.length,u="",h=!0;for(let e=0;e<l;e+=1)i=r[e],n=i[0],"space"!==n||e!==l-1||s?"comment"===n?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",c[a]||c[o]||","===u.slice(-1)?h=!1:u+=i[1]):u+=i[1]:h=!1;if(!h){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={value:u,raw:s}}e[t]=u}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}colon(e){let t,r,s,i=0;for(let[n,o]of e.entries()){if(t=o,r=t[0],"("===r&&(i+=1),")"===r&&(i-=1),0===i&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return n}this.doubleColon(t)}s=t}return!1}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}precheckMissedSemicolon(){}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let i=t-1;i>=0&&(r=e[i],"space"===r[0]||(s+=1,2!==s));i--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}},20:(e,t,r)=>{"use strict";let s=r(671),i=r(258),n=r(939),o=r(19),a=r(723),l=r(88),c=r(250),u=r(461),h=r(728),p=r(932),f=r(353),d=r(632),m=r(995),g=r(964),w=r(715),y=r(675),x=r(25),v=r(631);function b(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new a(e)}b.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new a).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return b([i(r)]).process(e,t)},i},b.stringify=l,b.parse=g,b.fromJSON=c,b.list=w,b.comment=e=>new p(e),b.atRule=e=>new f(e),b.decl=e=>new i(e),b.rule=e=>new y(e),b.root=e=>new x(e),b.document=e=>new u(e),b.CssSyntaxError=s,b.Declaration=i,b.Container=o,b.Processor=a,b.Document=u,b.Comment=p,b.Warning=h,b.AtRule=f,b.Result=d,b.Input=m,b.Rule=y,b.Root=x,b.Node=v,n.registerPostcss(b),e.exports=b,b.default=b},981:(e,t,r)=>{"use strict";let{SourceMapConsumer:s,SourceMapGenerator:i}=r(209),{existsSync:n,readFileSync:o}=r(777),{dirname:a,join:l}=r(830);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=a(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new s(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}loadFile(e){if(this.root=a(e),n(e))return this.mapFile=e,o(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof s)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(a(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=c,c.default=c},723:(e,t,r)=>{"use strict";let s=r(647),i=r(939),n=r(461),o=r(25);class a{constructor(e=[]){this.version="8.4.21",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new s(this,e,t):new i(this,e,t)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}}e.exports=a,a.default=a,o.registerProcessor(a),n.registerProcessor(a)},632:(e,t,r)=>{"use strict";let s=r(728);class i{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new s(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=i,i.default=i},25:(e,t,r)=>{"use strict";let s,i,n=r(19);class o extends n{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}toResult(e={}){return new s(new i,this,e).stringify()}}o.registerLazyResult=e=>{s=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o,n.registerRoot(o)},675:(e,t,r)=>{"use strict";let s=r(19),i=r(715);class n extends s{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}e.exports=n,n.default=n,s.registerRule(n)},62:e=>{"use strict";const t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};class r{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+s+i,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let i=e.nodes[s],n=this.raw(i,"before");n&&this.builder(n),this.stringify(i,t!==s||r)}}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}raw(e,r,s){let i;if(s||(s=r),r&&(i=e.raws[r],void 0!==i))return i;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return t[s];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[s])return o.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let t="raw"+((a=s)[0].toUpperCase()+a.slice(1));this[t]?i=this[t](o,e):o.walk((e=>{if(i=e.raws[r],void 0!==i)return!1}))}var a;return void 0===i&&(i=t[s]),o.rawCache[s]=i,i}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&"root"!==s.type;)i+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}}e.exports=r,r.default=r},88:(e,t,r)=>{"use strict";let s=r(62);function i(e,t){new s(t).stringify(e)}e.exports=i,i.default=i},513:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},852:e=>{"use strict";const t="'".charCodeAt(0),r='"'.charCodeAt(0),s="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),o=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),h="]".charCodeAt(0),p="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),m="}".charCodeAt(0),g=";".charCodeAt(0),w="*".charCodeAt(0),y=":".charCodeAt(0),x="@".charCodeAt(0),v=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,k=/.[\n"'(/\\]/,C=/[\da-f]/i;e.exports=function(e,O={}){let S,R,A,_,E,P,M,F,$,L,I=e.css.valueOf(),U=O.ignoreErrors,j=I.length,D=0,B=[],T=[];function z(t){throw e.error("Unclosed "+t,D)}return{back:function(e){T.push(e)},nextToken:function(e){if(T.length)return T.pop();if(D>=j)return;let O=!!e&&e.ignoreUnclosed;switch(S=I.charCodeAt(D),S){case n:case o:case l:case c:case a:R=D;do{R+=1,S=I.charCodeAt(R)}while(S===o||S===n||S===l||S===c||S===a);L=["space",I.slice(D,R)],D=R-1;break;case u:case h:case d:case m:case y:case g:case f:{let e=String.fromCharCode(S);L=[e,e,D];break}case p:if(F=B.length?B.pop()[1]:"",$=I.charCodeAt(D+1),"url"===F&&$!==t&&$!==r&&$!==o&&$!==n&&$!==l&&$!==a&&$!==c){R=D;do{if(P=!1,R=I.indexOf(")",R+1),-1===R){if(U||O){R=D;break}z("bracket")}for(M=R;I.charCodeAt(M-1)===s;)M-=1,P=!P}while(P);L=["brackets",I.slice(D,R+1),D,R],D=R}else R=I.indexOf(")",D+1),_=I.slice(D,R+1),-1===R||k.test(_)?L=["(","(",D]:(L=["brackets",_,D,R],D=R);break;case t:case r:A=S===t?"'":'"',R=D;do{if(P=!1,R=I.indexOf(A,R+1),-1===R){if(U||O){R=D+1;break}z("string")}for(M=R;I.charCodeAt(M-1)===s;)M-=1,P=!P}while(P);L=["string",I.slice(D,R+1),D,R],D=R;break;case x:v.lastIndex=D+1,v.test(I),R=0===v.lastIndex?I.length-1:v.lastIndex-2,L=["at-word",I.slice(D,R+1),D,R],D=R;break;case s:for(R=D,E=!0;I.charCodeAt(R+1)===s;)R+=1,E=!E;if(S=I.charCodeAt(R+1),E&&S!==i&&S!==o&&S!==n&&S!==l&&S!==c&&S!==a&&(R+=1,C.test(I.charAt(R)))){for(;C.test(I.charAt(R+1));)R+=1;I.charCodeAt(R+1)===o&&(R+=1)}L=["word",I.slice(D,R+1),D,R],D=R;break;default:S===i&&I.charCodeAt(D+1)===w?(R=I.indexOf("*/",D+2)+1,0===R&&(U||O?R=I.length:z("comment")),L=["comment",I.slice(D,R+1),D,R],D=R):(b.lastIndex=D+1,b.test(I),R=0===b.lastIndex?I.length-1:b.lastIndex-2,L=["word",I.slice(D,R+1),D,R],B.push(L),D=R)}return D++,L},endOfFile:function(){return 0===T.length&&D>=j},position:function(){return D}}}},448:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},728:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},272:(e,t,r)=>{"use strict";const s=r(670),i={autoRename:!1,autoRenameStrict:!1,blacklist:{},clean:!0,greedy:!1,processUrls:!1,stringMap:[],useCalc:!1,aliases:{},processEnv:!0};function n(e){return e.sort(((e,t)=>e.priority-t.priority))}e.exports.configure=(e={},t=[],r={})=>{const o={...i,...e};return o.stringMap=function(e){if(!Array.isArray(e))return;let t=!1,r=!1;for(const s of e){if(t&&r)break;"left-right"===s.name?t=!0:"ltr-rtl"===s.name&&(r=!0)}return t||e.push({name:"left-right",priority:100,exclusive:!1,search:["left","Left","LEFT"],replace:["right","Right","RIGHT"],options:{scope:"*",ignoreCase:!1}}),r||e.push({name:"ltr-rtl",priority:100,exclusive:!1,search:["ltr","Ltr","LTR"],replace:["rtl","Rtl","RTL"],options:{scope:"*",ignoreCase:!1}}),n(e)}(o.stringMap),o.plugins=function(e){const t=[];return e&&e.some((e=>"rtlcss"===e.name))||t.push(s),n([...t,...e])}(t),o.hooks=function(e){const t={pre(){},post(){}};return"function"==typeof e.pre&&(t.pre=e.pre),"function"==typeof e.post&&(t.post=e.post),t}(r),o}},915:e=>{"use strict";e.exports=e=>{const t=e.text.match(/^\s*!?\s*rtl:/);if(!t)return;let r=e.text.slice(t[0].length),s=r.indexOf(":");const i={source:e,name:"",param:"",begin:!0,end:!0,blacklist:!1,preserve:!1};return-1!==s?(i.name=r.slice(0,s),i.begin="end"!==i.name,i.end="begin"!==i.name,"begin"===i.name||"end"===i.name?(r=r.slice(i.name.length+1),s=r.indexOf(":"),-1!==s?(i.name=r.slice(0,s),i.param=r.slice(s+1)):i.name=r):i.param=r.slice(s+1)):i.name=r,i}},670:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const config=__webpack_require__(272),util=__webpack_require__(805);module.exports={name:"rtlcss",priority:100,directives:{control:{ignore:{expect:{atrule:!0,comment:!0,decl:!0,rule:!0},endNode:null,begin(e,t,r){if(null===this.endNode&&t.begin&&t.end){let t=e;for(;t&&t.nodes;)t=t.nodes[t.nodes.length-1];this.endNode=t}return"comment"!==e.type||!/^\s*!?\s*rtl:end:ignore/.test(e.text)},end(e,t,r){return!!(t.begin!==t.end&&"comment"===e.type||t.begin&&t.end&&e===this.endNode)&&(this.endNode=null,!0)}},rename:{expect:{rule:!0},begin:(e,t,r)=>(e.selector=r.util.applyStringMap(e.selector,!1),!1),end:(e,t)=>!0},raw:{expect:{self:!0},begin(e,t,r){const s=r.postcss.parse(t.param,{from:e.source.input.from});return s.walk((e=>{e[r.symbol]=!0})),e.parent.insertBefore(e,s),!0},end:(e,t)=>!0},remove:{expect:{atrule:!0,rule:!0,decl:!0},begin(e,t,r){let s=!1;switch(e.type){case"atrule":case"rule":case"decl":s=!0,e.remove()}return s},end:(e,t,r)=>!0},options:{expect:{self:!0},stack:[],begin(e,t,r){let s;this.stack.push(util.extend({},r.config));try{s=JSON.parse(t.param)}catch(t){throw e.error("Invalid options object",{details:t})}return r.config=config.configure(s,r.config.plugins),r.util=util.configure(r.config),!0},end(e,t,r){const s=this.stack.pop();return s&&!t.begin&&(r.config=s,r.util=util.configure(r.config)),!0}},config:{expect:{self:!0},stack:[],begin(node,metadata,context){let configuration;this.stack.push(util.extend({},context.config));try{configuration=eval(`(${metadata.param})`)}catch(e){throw node.error("Invalid config object",{details:e})}return context.config=config.configure(configuration.options,configuration.plugins),context.util=util.configure(context.config),!0},end(e,t,r){const s=this.stack.pop();return s&&!t.begin&&(r.config=s,r.util=util.configure(r.config)),!0}}},value:[{name:"ignore",action:(e,t,r)=>!0},{name:"prepend",action(e,t,r){let s="";const i=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${i?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>{s+=t})),e.value=i?e.raws.value.raw=s+e.raws.value.raw:s+e.value,!0}},{name:"append",action(e,t,r){let s="";const i=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${i?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>{s=t+s})),e.value=i?e.raws.value.raw+=s:e.value+s,!0}},{name:"insert",action(e,t,r){const s=e.raws.value&&e.raws.value.raw,i=`${e.raws.between.substr(1).trim()}${s?e.raws.value.raw:e.value}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((e,t)=>t+e));return e.value=s?e.raws.value.raw=i:i,!0}},{name:"",action(e,t,r){const s=e.raws.value&&e.raws.value.raw;return`${e.raws.between.substr(1).trim()}${s?e.raws.value.raw:""}${e.important?e.raws.important.substr(9).trim():""}`.replace(t,((t,r)=>{e.value=s?e.raws.value.raw=r+t:r})),!0}}]},processors:[{name:"variable",expr:/^--/im,action:(e,t)=>({prop:e,value:t})},{name:"direction",expr:/direction/im,action:(e,t,r)=>({prop:e,value:r.util.swapLtrRtl(t)})},{name:"left",expr:/left/im,action(e,t,r){return{prop:e.replace(this.expr,"right"),value:t}}},{name:"right",expr:/right/im,action(e,t,r){return{prop:e.replace(this.expr,"left"),value:t}}},{name:"four-value syntax",expr:/^(margin|padding|border-(color|style|width))$/gi,cache:null,action(e,t,r){null===this.cache&&(this.cache={match:/[^\s\uFFFD]+/g});const s=r.util.guardFunctions(t),i=s.value.match(this.cache.match);if(i&&4===i.length&&(s.store.length>0||i[1]!==i[3])){let e=0;s.value=s.value.replace(this.cache.match,(()=>i[(4-e++)%4]))}return{prop:e,value:r.util.unguardFunctions(s)}}},{name:"border radius",expr:/border-radius/gi,cache:null,flip(e){const t=e.match(this.cache.match);let r;if(t)switch(t.length){case 2:r=1,t[0]!==t[1]&&(e=e.replace(this.cache.match,(()=>t[r--])));break;case 3:e=e.replace(this.cache.white,(e=>`${e+t[1]} `));break;case 4:r=0,t[0]===t[1]&&t[2]===t[3]||(e=e.replace(this.cache.match,(()=>t[(5-r++)%4])))}return e},action(e,t,r){null===this.cache&&(this.cache={match:/[^\s\uFFFD]+/g,slash:/[^/]+/g,white:/(^\s*)/});const s=r.util.guardFunctions(t);return s.value=s.value.replace(this.cache.slash,(e=>this.flip(e))),{prop:e,value:r.util.unguardFunctions(s)}}},{name:"shadow",expr:/shadow/gi,cache:null,action(e,t,r){null===this.cache&&(this.cache={replace:/[^,]+/g});const s=r.util.guardHexColors(t),i=r.util.guardFunctions(s.value);return i.value=i.value.replace(this.cache.replace,(e=>r.util.negate(e))),s.value=r.util.unguardFunctions(i),{prop:e,value:r.util.unguardHexColors(s)}}},{name:"transform and perspective origin",expr:/(?:transform|perspective)-origin/gi,cache:null,flip(e,t){return"0"===e?e="100%":e.match(this.cache.percent)?e=t.util.complement(e):e.match(this.cache.length)&&(e=t.util.flipLength(e)),e},action(e,t,r){if(null===this.cache&&(this.cache={match:r.util.regex(["calc","percent","length"],"g"),percent:r.util.regex(["calc","percent"],"i"),length:r.util.regex(["length"],"gi"),xKeyword:/(left|right)/i}),t.match(this.cache.xKeyword))t=r.util.swapLeftRight(t);else{const e=r.util.guardFunctions(t),s=e.value.match(this.cache.match);s&&s.length>0&&(s[0]=this.flip(s[0],r),e.value=e.value.replace(this.cache.match,(()=>s.shift())),t=r.util.unguardFunctions(e))}return{prop:e,value:t}}},{name:"transform",expr:/^(?!text-).*?transform$/gi,cache:null,flip(e,t,r){let s=0;return e.replace(this.cache.unit,(e=>t(++s,e)))},flipMatrix(e,t){return this.flip(e,((e,r)=>2===e||3===e||5===e?t.util.negate(r):r),t)},flipMatrix3D(e,t){return this.flip(e,((e,r)=>2===e||4===e||5===e||13===e?t.util.negate(r):r),t)},flipRotate3D(e,t){return this.flip(e,((e,r)=>1===e||4===e?t.util.negate(r):r),t)},action(e,t,r){null===this.cache&&(this.cache={negatable:/((translate)(x|3d)?|rotate(z|y)?)$/gi,unit:r.util.regex(["calc","number"],"g"),matrix:/matrix$/i,matrix3D:/matrix3d$/i,skewXY:/skew(x|y)?$/i,rotate3D:/rotate3d$/i});const s=r.util.guardFunctions(t);return{prop:e,value:r.util.unguardFunctions(s,((e,t)=>(t.length&&(t.match(this.cache.matrix3D)?e=this.flipMatrix3D(e,r):t.match(this.cache.matrix)?e=this.flipMatrix(e,r):t.match(this.cache.rotate3D)?e=this.flipRotate3D(e,r):t.match(this.cache.skewXY)?e=r.util.negateAll(e):t.match(this.cache.negatable)&&(e=r.util.negate(e))),e)))}}},{name:"transition",expr:/transition(-property)?$/i,action:(e,t,r)=>({prop:e,value:r.util.swapLeftRight(t)})},{name:"background",expr:/(background|object)(-position(-x)?|-image)?$/i,cache:null,flip(e,t,r){const s=util.saveTokens(e,!0),i=s.value.match(this.cache.match);if(i&&i.length>0){const e=(s.value.match(this.cache.position)||"").length;i.length>=3||2===e?s.value=util.swapLeftRight(s.value):("0"===i[0]?i[0]="100%":i[0].match(this.cache.percent)?i[0]=t.util.complement(i[0]):i[0].match(this.cache.length)?r?i[0]=t.util.flipLength(i[0]):1===i.length?i[0]=`right ${i[0]} top 50%`:e||2!==i.length||(i[0]=`right ${i[0]}`,i[1]=`top ${i[1]}`):i[0]=t.util.swapLeftRight(i[0]),s.value=s.value.replace(this.cache.match,(()=>i.shift())))}return util.restoreTokens(s)},update(e,t,r){return r.match(this.cache.gradient)?(t=e.util.swapLeftRight(t)).match(this.cache.angle)&&(t=e.util.negate(t)):!0!==e.config.processUrls&&!0!==e.config.processUrls.decl||!r.match(this.cache.url)||(t=e.util.applyStringMap(t,!0)),t},action(e,t,r){null===this.cache&&(this.cache={match:r.util.regex(["position","percent","length","calc"],"ig"),percent:r.util.regex(["calc","percent"],"i"),position:r.util.regex(["position"],"g"),length:r.util.regex(["length"],"gi"),gradient:/gradient$/i,angle:/\d+(deg|g?rad|turn)/i,url:/^url/i});const s=r.util.guardHexColors(t),i=r.util.guardFunctions(s.value),n=i.value.split(","),o=e.toLowerCase();if("background-image"!==o)for(let e=0;e<n.length;e++)n[e]=this.flip(n[e],r,o.endsWith("-x"));return i.value=n.join(","),s.value=r.util.unguardFunctions(i,this.update.bind(this,r)),{prop:e,value:r.util.unguardHexColors(s)}}},{name:"keyword",expr:/float|clear|text-align|justify-(content|items|self)/i,action:(e,t,r)=>({prop:e,value:r.util.swapLeftRight(t)})},{name:"cursor",expr:/cursor/i,cache:null,update(e,t,r){return!0!==e.config.processUrls&&!0!==e.config.processUrls.decl||!r.match(this.cache.url)?t:e.util.applyStringMap(t,!0)},flip(e){return e.replace(this.cache.replace,((e,t)=>e.replace(t,t.replace(this.cache.e,"*").replace(this.cache.w,"e").replace(this.cache.star,"w"))))},action(e,t,r){null===this.cache&&(this.cache={replace:/\b(ne|nw|se|sw|nesw|nwse)-resize/gi,url:/^url/i,e:/e/i,w:/w/i,star:/\*/i});const s=r.util.guardFunctions(t);return s.value=s.value.split(",").map((e=>this.flip(e))).join(","),{prop:e,value:r.util.unguardFunctions(s,this.update.bind(this,r))}}}]}},314:(e,t,r)=>{"use strict";const s=r(20),i=r(28),n=r(272),o=r(805);e.exports=(e,t,r)=>{const a=Symbol("processed"),l=n.configure(e,t,r),c={postcss:s,config:l,util:o.configure(l),symbol:a};let u=0;const h={};function p(e,t){if(!e[a]){let t=!1;return i.walk((r=>{!r.metadata.blacklist&&r.directive.expect[e.type]&&(r.directive.begin(e,r.metadata,c)&&(t=!0),r.metadata.end&&r.directive.end(e,r.metadata,c)&&i.pop(r))})),e[a]=!0,!t}return!1}return{postcssPlugin:"rtlcss",Once(e){c.config.hooks.pre(e,s),p(e)},Rule(e){p(e)&&(u=0)},AtRule(e){!p(e)||!0!==c.config.processUrls&&!0!==c.config.processUrls.atrule||(e.params=c.util.applyStringMap(e.params,!0))},Comment(e,{result:t}){p(e)&&i.parse(e,t,(r=>{let s=!0;return null===r.directive&&(r.preserve=!c.config.clean,c.util.each(c.config.plugins,(e=>{const i=c.config.blacklist[e.name];return i&&!0===i[r.metadata.name]?(r.metadata.blacklist=!0,r.metadata.end&&(s=!1),r.metadata.begin&&t.warn(`directive "${e.name}.${r.metadata.name}" is blacklisted.`,{node:r.source}),!1):(r.directive=e.directives.control[r.metadata.name],!r.directive&&void 0)}))),r.directive?!r.metadata.begin&&r.metadata.end?(r.directive.end(e,r.metadata,c)&&i.pop(r),s=!1):r.directive.expect.self&&r.directive.begin(e,r.metadata,c)&&r.metadata.end&&r.directive.end(e,r.metadata,c)&&(s=!1):r.metadata.blacklist||(s=!1,t.warn(`unsupported directive "${r.metadata.name}".`,{node:r.source})),s}))},Declaration(e,{result:t}){if(p(e)){if(!c.util.each(c.config.plugins,(t=>c.util.each(t.directives.value,(t=>{const r=e.raws.value&&e.raws.value.raw,s=c.util.regexDirective(t.name);if(s.test(`${e.raws.between}${r?e.raws.value.raw:e.value}${e.important&&e.raws.important?e.raws.important:""}`)&&(s.lastIndex=0,t.action(e,s,c)))return c.config.clean&&(e.raws.between=c.util.trimDirective(e.raws.between),e.important&&e.raws.important&&(e.raws.important=c.util.trimDirective(e.raws.important)),e.value=r?e.raws.value.raw=c.util.trimDirective(e.raws.value.raw):c.util.trimDirective(e.value)),u++,!1})))))return;if(c.util.each(c.config.plugins,(t=>c.util.each(t.processors,(t=>{const r=c.config.aliases[e.prop];if((r||e.prop).match(t.expr)){const s=e.raws.value&&e.raws.value.raw?e.raws.value.raw:e.value,i=c.util.saveComments(s);c.config.processEnv&&(i.value=c.util.swap(i.value,"safe-area-inset-left","safe-area-inset-right",{ignoreCase:!1}));const n=t.action(e.prop,i.value,c);return i.value=n.value,n.value=c.util.restoreComments(i),(!r&&n.prop!==e.prop||n.value!==s)&&(u++,e.prop=n.prop,e.value=n.value),!1}})))),c.config.autoRename&&!u&&"rule"===e.parent.type&&c.util.isLastOfType(e)){const t=c.util.applyStringMap(e.parent.selector);if(!0===c.config.autoRenameStrict){const r=h[t];r?(r.selector=e.parent.selector,e.parent.selector=t):h[e.parent.selector]=e.parent}else e.parent.selector=t}}},OnceExit(e,{result:t}){i.walk((e=>{t.warn(`unclosed directive "${e.metadata.name}".`,{node:e.source})}));for(const e of Object.keys(h))t.warn("renaming skipped due to lack of a matching pair.",{node:h[e]});c.config.hooks.post(e,s)}}},e.exports.postcss=!0,e.exports.process=function(e,t,r,i){return s([this(t,r,i)]).process(e).css},e.exports.configure=function(e={}){return s([this(e.options,e.plugins,e.hooks)])}},28:(e,t,r)=>{"use strict";const s=r(915);e.exports={stack:[],pop(e){const t=this.stack.indexOf(e);-1!==t&&this.stack.splice(t,1),e.preserve||e.source.remove()},parse(e,t,r){let i;const n=s(e);n&&(!n.begin&&n.end?this.walk((t=>{if(n.name===t.metadata.name)return this.pop(t),i={metadata:n,directive:t.directive,source:e,preserve:t.preserve},!1})):i={metadata:n,directive:null,source:e,preserve:null},void 0===i?t.warn(`found end "${n.name}" without a matching begin.`,{node:e}):r(i)?this.stack.push(i):i.preserve||i.source.remove())},walk(e){let t=this.stack.length;for(;--t>-1&&e(this.stack[t]););}}},805:e=>{"use strict";let t,r=0;const s=new RegExp("�","ig"),i=new RegExp("¤","ig"),n="\\-?(\\d*?\\.\\d+|\\d+)",o="(calc¤)|("+n+")(?!d\\()",a="«\\d+:\\d+»",l=/\/\*[^]*?\*\//gim,c=/\/\*\s*!?\s*rtl:[^]*?\*\//gim,u=/[.*+?^${}()|[\]\\]/g,h=/\([^()]+\)/i,p=/#[a-f0-9]{3,6}/gi,f=/calc/,d=new RegExp(a,"ig"),m=new RegExp("\\w*?«\\d+:\\d+»","ig"),g=new RegExp(o,"i"),w=new RegExp(o,"ig"),y=new RegExp(o,"i"),x={scope:"*",ignoreCase:!0};function v(e){return e.replace(u,"\\$&")}e.exports={extend(e,t){void 0!==e&&"object"==typeof e||(e={});for(const r in t)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=t[r]);return e},swap(e,r,s,i=x){let n=`${v(r)}|${v(s)}`;(Object.prototype.hasOwnProperty.call(i,"greedy")?i.greedy:t.greedy)||(n=`\\b(${n})\\b`);const o=i.ignoreCase?"img":"mg";return e.replace(new RegExp(n,o),(e=>{return t=e,n=r,(i.ignoreCase?t.toLowerCase()===n.toLowerCase():t===n)?s:r;var t,n}))},swapLeftRight(e){return this.swap(e,"left","right")},swapLtrRtl(e){return this.swap(e,"ltr","rtl")},applyStringMap(e,r){let s=e;for(const e of t.stringMap){const t=this.extend(e.options,x);if("*"===t.scope||r&&"url"===t.scope||!r&&"selector"===t.scope){if(Array.isArray(e.search)&&Array.isArray(e.replace))for(let r=0;r<e.search.length;r++)s=this.swap(s,e.search[r],e.replace[r%e.search.length],t);else s=this.swap(s,e.search,e.replace,t);if(!0===e.exclusive)break}}return s},negate(e){const t=this.saveTokens(e);return t.value=t.value.replace(y,(e=>i.test(e)?e.replace(i,(e=>"(-1*"+e+")")):-1*Number.parseFloat(e))),this.restoreTokens(t)},negateAll(e){const t=this.saveTokens(e);return t.value=t.value.replace(w,(e=>i.test(e)?e.replace(i,(e=>"(-1*"+e+")")):-1*Number.parseFloat(e))),this.restoreTokens(t)},complement(e){const t=this.saveTokens(e);return t.value=t.value.replace(g,(e=>i.test(e)?e.replace(i,(e=>"(100% - "+e+")")):100-Number.parseFloat(e))),this.restoreTokens(t)},flipLength:e=>t.useCalc?`calc(100% - ${e})`:e,save(e,t,r,s,i){const n={value:t,store:[],replacement:r,restorer:s};return n.value=n.value.replace(e,(e=>i&&i.test(e)?e:(n.store.push(e),n.replacement))),n},restore(e){let t=0;const r=e.value.replace(e.restorer,(()=>e.store[t++]));return e.store.length=0,r},saveComments(e){return this.save(l,e,"�",s)},restoreComments(e){return this.restore(e)},saveTokens(e,t){return!0===t?this.save(m,e,"¤",i,f):this.save(d,e,"¤",i)},restoreTokens(e){return this.restore(e)},guard(e,t){const s={value:t,store:[],offset:r++,token:"«"+r};for(;e.test(s.value);)s.value=s.value.replace(e,(e=>(s.store.push(e),`${s.token}:${s.store.length}»`)));return s},unguard(e,t){const r=new RegExp("(\\w*?)"+e.token+":(\\d+)»","i");for(;r.test(e.value);)e.value=e.value.replace(r,((r,s,i)=>{const n=e.store[i-1];return"function"==typeof t?s+t(n,s):s+n}));return e.value},guardHexColors(e){return this.guard(p,e)},unguardHexColors(e,t){return this.unguard(e,t)},guardFunctions(e){return this.guard(h,e)},unguardFunctions(e,t){return this.unguard(e,t)},trimDirective:e=>e.replace(c,""),regexCache:{},regexDirective(e){return this.regexCache[e]=this.regexCache[e]||new RegExp("(?:\\/\\*\\s*(?:!)?\\s*rtl:"+(e?v(e)+"(?::)?":"")+")([^]*?)(?:\\*\\/)","img"),this.regexCache[e]},regex(e,t){let r="";for(const t of e)switch(t){case"percent":r+=`|(${n}%)`;break;case"length":r+=`|(${n})(?:ex|ch|r?em|vh|vw|vmin|vmax|px|mm|cm|in|pt|pc)?`;break;case"number":r+=`|(${n})`;break;case"position":r+="|(left|center|right|top|bottom)";break;case"calc":r+=`|(calc${a})`}return new RegExp(r.slice(1),t)},isLastOfType(e){let t=!0,r=e.next();for(;r;){if(r.type===e.type){t=!1;break}r=r.next()}return t},each:(e,t)=>!e.some((e=>!1===t(e)))},e.exports.configure=function(e){return t=e,this}},868:()=>{},777:()=>{},830:()=>{},209:()=>{},414:()=>{},961:e=>{e.exports={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",i=r;for(;i--;)s+=e[Math.random()*e.length|0];return s}}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}var __webpack_exports__=__webpack_require__(314);rtlcss=__webpack_exports__;
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RtlcssWrapper
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rtlcss_wrapper/version"
4
+ require "mini_racer"
5
+
6
+ module RtlcssWrapper
7
+ class FlipError < StandardError; end
8
+
9
+ def self.flip_css(orig_css)
10
+ @context ||=
11
+ begin
12
+ context = MiniRacer::Context.new(timeout: 10_000)
13
+ context.eval(
14
+ File.read(File.expand_path("../dist/main.js", __dir__))
15
+ )
16
+ context.eval(<<~JS)
17
+ function rtlcssWrapper(origCss) {
18
+ return rtlcss.process(origCss);
19
+ }
20
+ JS
21
+ context
22
+ end
23
+ @context.call("rtlcssWrapper", orig_css)
24
+ rescue MiniRacer::RuntimeError => e
25
+ raise FlipError.new(cause: e)
26
+ end
27
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/rtlcss_wrapper/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "rtlcss_wrapper"
7
+ spec.version = RtlcssWrapper::VERSION
8
+ spec.authors = ["OsamaSayegh"]
9
+ spec.email = ["team@discourse.org"]
10
+
11
+ spec.summary = "A wrapper around the rtlcss npm package to flip CSS direction in Ruby"
12
+ spec.description = spec.summary
13
+ spec.homepage = "https://github.com/discourse/rtlcss_wrapper"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.7.7"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = spec.homepage
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(__dir__) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|rtlcss-miniracer)/|\.(?:git|circleci)|appveyor)})
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_dependency "mini_racer", "~> 0.6.3"
32
+
33
+ spec.add_development_dependency "rake", "~> 13.0"
34
+ spec.add_development_dependency "minitest", "~> 5.0"
35
+ spec.add_development_dependency "rubocop", "~> 1.21"
36
+ spec.add_development_dependency "rubocop-discourse"
37
+ end
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rtlcss_wrapper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - OsamaSayegh
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mini_racer
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.6.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.6.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.21'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.21'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-discourse
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: A wrapper around the rtlcss npm package to flip CSS direction in Ruby
84
+ email:
85
+ - team@discourse.org
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".rubocop.yml"
91
+ - CHANGELOG.md
92
+ - CODE_OF_CONDUCT.md
93
+ - Gemfile
94
+ - LICENSE.txt
95
+ - README.md
96
+ - Rakefile
97
+ - dist/main.js
98
+ - lib/rtlcss_wrapper.rb
99
+ - lib/rtlcss_wrapper/version.rb
100
+ - rtlcss_wrapper.gemspec
101
+ homepage: https://github.com/discourse/rtlcss_wrapper
102
+ licenses:
103
+ - MIT
104
+ metadata:
105
+ homepage_uri: https://github.com/discourse/rtlcss_wrapper
106
+ source_code_uri: https://github.com/discourse/rtlcss_wrapper
107
+ post_install_message:
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: 2.7.7
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ requirements: []
122
+ rubygems_version: 3.1.6
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: A wrapper around the rtlcss npm package to flip CSS direction in Ruby
126
+ test_files: []