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,SAA2B,GACzB,GAiNF,SAAiC,GAC/B,GAA2B,SAAvB,EAAO,OAAO,KAEhB,OADA,EAAO,KAAK,iDAAkD,CAAE,KAAM,KAC/D,CAEX,CAtNM,CAAwB,GAE1B,YADA,EAAO,SAGT,IAAI,EAAa,QAAQ,OAKzB,EAAW,KAAK,UAAY,EAAO,KAAK,UACxC,EAAO,MAAM,SAAQ,SAAS,GAC5B,IAAI,EAAoB,GAAxB,CACA,IAAI,EAAQ,EAAK,QACjB,EAAM,KAAK,OAAS,EAAK,KAAK,OAC9B,EAAM,KAAK,MAAQ,EAAK,KAAK,MAC7B,EAAM,KAAK,QAAU,EAAK,KAAK,QAC/B,EAAW,OAAO,EALmB,CAMvC,IACA,EAAW,SAAW,uBAAyB,EAAO,OAAO,WAE7D,EAAO,OAAO,aAAa,EAAQ,GACnC,EAAO,QACT,CArDI,CAAkB,IACkC,IAA3C,EAAiB,QAAQ,EAAO,OACzC,EAAiB,EAErB,IAIA,EAAI,WAAU,SAAS,GAGrB,IAFA,IACI,EADA,EAAW,EAAW,UAEjB,EAAI,EAAG,EAAI,EAAS,OAAQ,IACE,yBAAjC,EAAS,GAAG,UAAU,EAAG,KAA4D,MAA1B,EAAS,GAAG,OAAO,GAC3E,EAGH,EAAoB,KAAK,EAAS,IAFlC,EAAsB,CAAE,EAAS,IAIN,IAApB,EAAS,QAClB,EAAW,SAKX,IACF,EAAW,SAAW,EAAoB,KAAK,MAEnD,GAyYF,CACF","file":"/npm/postcss-extend@1.0.5/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/postcss-extend@1.0.5/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nvar postcss = require('postcss');\n// /*DEBUG*/var appendout = require('fs').appendFileSync;\n\nmodule.exports = postcss.plugin('postcss-extend', function extend() {\n\n  return function(css, result) {\n    var definingAtRules = ['define-placeholder', 'define-extend', 'extend-define'];\n    var extendingAtRules = ['extend'];\n    var recurseStack = [];\n    var isAntiPatternCSS = false;\n\n    // /*DEBUG*/appendout('./test/debugout.txt', '\\n----------------------------------------');\n\n    css.walkAtRules(function(atRule) {\n      if (definingAtRules.indexOf(atRule.name) !== -1) {\n        processDefinition(atRule);\n      } else if (extendingAtRules.indexOf(atRule.name) !== -1) {\n        processExtension(atRule);\n      }\n    });\n\n    //Selectively disclude silents and placeholders, find unused,\n    //and exclude from the final output\n    css.walkRules(function(targetNode) {\n      var tgtSaved = targetNode.selectors;\n      var selectorAccumulator;\n      for (var i = 0; i < tgtSaved.length; i++) {\n        if (tgtSaved[i].substring(0, 20) !== '@define-placeholder ' && tgtSaved[i].charAt(0) !== '%') {\n          if (!selectorAccumulator) {\n            selectorAccumulator = [ tgtSaved[i] ];\n          } else {\n            selectorAccumulator.push(tgtSaved[i]);\n          }\n        } else if (tgtSaved.length === 1) {\n          targetNode.remove();\n        // /*DEBUG*/} else {\n          // /*DEBUG*/appendout('./test/debugout.txt', '\\nSifted out placeholder/silent ' + tgtSaved[i]);\n        }\n      }\n      if (selectorAccumulator) {\n        targetNode.selector = selectorAccumulator.join(', ');\n      }\n    });\n\n    //simplification process to find definitions in the future\n    function processDefinition(atRule) {\n      if (isBadDefinitionLocation(atRule)) {\n        atRule.remove();\n        return;\n      }\n      var definition = postcss.rule();\n\n      //Manually copy styling properties (semicolon, whitespace)\n      //to newly created and cloned nodes,\n      //cf. https://github.com/postcss/postcss/issues/85\n      definition.raws.semicolon = atRule.raws.semicolon;\n      atRule.nodes.forEach(function(node) {\n        if (isBadDefinitionNode(node)) return;\n        var clone = node.clone();\n        clone.raws.before = node.raws.before;\n        clone.raws.after = node.raws.after;\n        clone.raws.between = node.raws.between;\n        definition.append(clone);\n      });\n      definition.selector = '@define-placeholder ' + atRule.params.toString();\n      // /*DEBUG*/appendout('./test/debugout.txt', '\\nDeclaring placeholder : ' + definition.selector);\n      atRule.parent.insertBefore(atRule, definition);\n      atRule.remove();\n    }\n\n    function processExtension(atRule) {\n      if (isBadExtension(atRule)) {\n        if (!atRule.parent.nodes.length || (atRule.parent.nodes.length === 1 && atRule.parent.type !== 'root')) {\n          atRule.parent.remove();\n        } else {\n          atRule.remove();\n        }\n        return;\n      }\n      var originSels = atRule.parent.selectors;\n      var selectorRetainer = [];\n      var couldExtend = false;\n      var subTarget = {\n        node: {},\n        bool: false\n      };\n\n      if (!hasMediaAncestor(atRule)) {\n        css.walkRules(function(targetNode) {\n          var tgtSaved = targetNode.selectors;\n          //Strip all @define-placeholders and save slug-selectors present in tgtSaved\n          for (var i = 0; i < tgtSaved.length; i++) {\n            if (tgtSaved[i].substring(0, 20) === '@define-placeholder ') {\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\nn[' + i + ']String = ' + tgtSaved[i] + ' Substring 0-20 = \\'' + tgtSaved[i].substring(0, 20) + '\\'');\n              tgtSaved[i] = tgtSaved[i].substring(20, (tgtSaved[i].length));\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\nresString = \\'' + tgtSaved[i] + '\\'');\n            }\n          }\n          var tgtAccumulate = targetNode.selectors;\n\n          for (var n = 0; n < tgtSaved.length; n++) {\n            //Operate on normal extendables\n            if (atRule.params === tgtSaved[n]) {\n              //check if target has unresolved extensions, then extend them\n              if (extensionRecursionHandler(atRule, targetNode)) {\n                //We need to re-evaluate the current atRule, as other classes (once passed over) may now be matching, so re-process and exit.\n                // /*DEBUG*/appendout('./test/debugout.txt', '\\n!Bumping evaluation of :' + atRule.parent);\n                processExtension(atRule);\n                couldExtend = true;\n                return;\n              }\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\nfound and extending : ' + tgtSaved[n] + ' : ' + originSels);\n\n              tgtAccumulate = tgtAccumulate.concat(originSels);\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\nCombined selectors :\\n' + tgtAccumulate);\n              couldExtend = true;\n              //Operate on sub-elements of extendables (thus extending them)\n            } else if (tgtSaved[n].substring(1).search(/[\\s.:#]/) + 1 !== -1) {\n              var tgtBase = tgtSaved[n].substring(0, tgtSaved[n].substring(1).search(/[\\s.:#]/) + 1);\n              var tgtSub = tgtSaved[n].substring(tgtSaved[n].substring(1).search(/[\\s.:#]/) + 1, tgtSaved[n].length);\n              if (atRule.params === tgtBase) {\n                //check if target rule has unresolved extensions, then extend them\n                if (extensionRecursionHandler(atRule, targetNode)) {\n                  //We need to re-evaluate the current atRule, as other classes (once passed over) may now be matching, so re-process and exit.\n                  // /*DEBUG*/appendout('./test/debugout.txt', '\\n!Bumping evaluation of :' + atRule.parent);\n                  processExtension(atRule);\n                  couldExtend = true;\n                  return;\n                }\n                //tack onto target node\n                // /*DEBUG*/appendout('./test/debugout.txt', '\\nfound and extending : ' + tgtSaved[n].substring(0, tgtSaved[n].substring(1).search(/[\\s.:#]/) + 1) + ' :\\n' + tgtBase + ' (' + tgtSub + ')');\n\n                // /*DEBUG*/appendout('./test/debugout.txt', '\\nCalling formSubSelector with (\\n' + originSels + ',\\n' + tgtSub);\n                tgtAccumulate = tgtAccumulate.concat(formSubSelector(originSels, tgtSub));\n                // /*DEBUG*/appendout('./test/debugout.txt', '\\nCombined selectors :\\n' + tgtAccumulate);\n                couldExtend = true;\n              }\n            }//END OF sub root-extensions\n          }\n          if (couldExtend) {\n            // /*DEBUG*/appendout('./test/debugout.txt', '\\nStart uniqreq2 :\\n' + tgtAccumulate);\n            //Kill off duplicate selectors\n            tgtAccumulate = uniqreq(tgtAccumulate).toString().replace(/,/g, ', ');\n            // /*DEBUG*/appendout('./test/debugout.txt', '\\nPost uniqreq2 :\\n' + tgtAccumulate);\n            targetNode.selector = tgtAccumulate;\n          }\n        });\n      //hasMediaAncestor === true: ---------------\n      } else {\n        // /*DEBUG*/appendout('./test/debugout.txt', '\\nAttempting to fetch declarations for ' + atRule.params + '...');\n        var backFirstTargetNode;\n        var targetNodeArray = [];\n        css.walkRules(function(subRule) {\n          //create a back-is-top stack so that we can efficiently operate on nodes in reverse\n          //thus retaining priority when copying declarations if there are multiple matches\n          if (!hasMediaAncestor(subRule) || subRule.parent === atRule.parent.parent) {\n            targetNodeArray.push(subRule);\n\n          //If is in @media extending another @media and is a targeted rule (two phase):\n          //check for an illegal extention, and then don't process that node.\n          } else if (subRule.selectors.indexOf(atRule.params) !== -1) {\n            isBadExtensionPair(atRule, subRule);\n          } else {\n            for (var s = 0; s < subRule.selectors.length; s++) {\n              if (subRule.selectors[s].substring(1).search(/[\\s.:#]/) + 1 !== -1 && subRule.selectors[s].substring(0, subRule.selectors[s].substring(1).search(/[\\s.:#]/) + 1) === atRule.params) {\n                  isBadExtensionPair(atRule, subRule);\n                  break;\n              }\n            }\n          }\n        }); //end of each rule\n        while (targetNodeArray.length > 0) {\n          backFirstTargetNode = targetNodeArray.pop();\n          if (backFirstTargetNode.selectors.indexOf(atRule.params) !== -1) {\n            //check if rule has unresolved extensions, then extend them\n            if (extensionRecursionHandler(atRule, backFirstTargetNode)) {\n              //We need to re-evaluate the current atRule, as other classes (once passed over) may now be matching, so re-process and exit.\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\n!Bumping evaluation of :' + atRule.parent);\n              processExtension(atRule);\n              couldExtend = true;\n              return;\n            }\n            //In scope, tack on selector to target rule\n            if (backFirstTargetNode.parent === atRule.parent.parent) {\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\n...tacking onto backFirstTargetNode :' + backFirstTargetNode);\n              selectorRetainer = backFirstTargetNode.selectors;\n              backFirstTargetNode.selector = uniqreq(selectorRetainer.concat(originSels)).join(', ');\n            //Out of scope, direcly copy declarations\n            } else {\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\n...grabbing backFirstTargetNode :\\n' + backFirstTargetNode);\n              safeCopyDeclarations(backFirstTargetNode, atRule.parent);\n            }\n            couldExtend = true;\n          } else {\n            //Pull from sub-elements of target nodes (thus extending them)\n            for (var m = 0; m < backFirstTargetNode.selectors.length; m++) {\n              var extTgtBase = backFirstTargetNode.selectors[m].substring(0, backFirstTargetNode.selectors[m].substring(1).search(/[\\s.:#]/) + 1);\n              var extTgtSub = backFirstTargetNode.selectors[m].substring(backFirstTargetNode.selectors[m].substring(1).search(/[\\s.:#]/) + 1, backFirstTargetNode.selectors[m].length);\n              if (backFirstTargetNode.selectors[m].substring(1).search(/[\\s.:#]/) + 1 !== -1 && extTgtBase === atRule.params) {\n                //check if target rule has unresolved extensions, then extend them\n                if (extensionRecursionHandler(atRule, backFirstTargetNode)) {\n                  //We need to re-evaluate the current atRule, as other classes (once passed over) may now be matching, so re-process and exit.\n                  // /*DEBUG*/appendout('./test/debugout.txt', '\\n!Bumping evaluation of :' + atRule.parent);\n                  processExtension(atRule);\n                  couldExtend = true;\n                  return;\n                }\n                if (backFirstTargetNode.parent === atRule.parent.parent) {\n                  //Use Tacking onto exiting selectors instead of new creation\n                  // /*DEBUG*/appendout('./test/debugout.txt', '\\nUtilizing existing brother subclass for extension, as nothing matches: \\n' + atRule.parent.selector + ' sub-' + extTgtSub);\n                  selectorRetainer = backFirstTargetNode.selectors;\n                  backFirstTargetNode.selector = uniqreq(selectorRetainer.concat(formSubSelector(originSels, extTgtSub))).join(', ');\n                } else {\n                  //check for prexisting sub classes before making one\n                  subTarget = findBrotherSubClass(atRule.parent, extTgtSub);\n                  if (subTarget.bool) {\n                    //utilize existing subclass for extension\n                    // /*DEBUG*/appendout('./test/debugout.txt', '\\nUtilizing existing subclass for extension:\\n' + subTarget.selector);\n                    safeCopyDeclarations(backFirstTargetNode, subTarget.node);\n                  } else {\n                    //create additional nodes below existing for each instance of subs\n                    // /*DEBUG*/appendout('./test/debugout.txt', '\\nUtilizing new subclass for extension, as nothing matches: \\n' + atRule.parent.selector + ' sub-' + extTgtSub);\n                    var newNode = postcss.rule();\n                    newNode.raws.semicolon = atRule.raws.semicolon;\n                    safeCopyDeclarations(backFirstTargetNode, newNode);\n                    newNode.selector = formSubSelector(atRule.parent.selectors, extTgtSub).join(', ');\n                    atRule.parent.parent.insertAfter(atRule.parent, newNode);\n                  }\n                }\n                couldExtend = true;\n              }\n            }\n          }\n        }\n      } //end of if hasMediaAncestor\n      if (!couldExtend) {\n        result.warn('\\'' + atRule.params + '\\', has not been defined, so it cannot be extended', { node: atRule });\n        // /*DEBUG*/appendout('./test/debugout.txt', '\\n\\'' + atRule.params + '\\' has not been defined!!!');\n      }\n      if (atRule.parent !== undefined) {\n        if (!atRule.parent.nodes.length || atRule.parent.nodes.length === 1) {\n          atRule.parent.remove();\n        } else {\n          atRule.remove();\n        }\n      }\n    }\n\n    function isBadDefinitionNode(node) {\n      if (node.type === 'rule' || node.type === 'atrule') {\n        result.warn('Defining at-rules cannot contain statements', { node: node });\n        return true;\n      }\n    }\n\n    function isBadDefinitionLocation(atRule) {\n      if (atRule.parent.type !== 'root') {\n        result.warn('Defining at-rules must occur at the root level', { node: atRule });\n        return true;\n      }\n    }\n\n    function isBadExtension(atRule) {\n      if (atRule === undefined) {\n        result.warn('Extending at-rules need a target', { node: atRule });\n        return true;\n      }\n      if (atRule.parent.type === 'root') {\n        result.warn('Extending at-rules cannot occur at the root level', { node: atRule });\n        return true;\n      }\n      if (atRule.parent.selector === undefined || atRule.parent.selector === '') {\n        if (atRule.parent.name === 'define-placeholder') {\n          result.warn('Extending at-rules cannot occur within @define statements, only within `%` silent classes', { node: atRule });\n        } else {\n          result.warn('Extending at-rules cannot occur within unnamed rules', { node: atRule });\n        }\n        return true;\n      }\n      if (atRule.params === '' || atRule.params.search(/\\s*/) !== 0) {\n        result.warn('Extending at-rules need a target', { node: atRule });\n        return true;\n      }\n    }\n\n    function isBadExtensionPair(atRule, targetNode) {\n      if (hasMediaAncestor(targetNode) && hasMediaAncestor(atRule) && targetNode.parent !== atRule.parent.parent) {\n        // /*DEBUG*/appendout('./test/debugout.txt', '\\nMEDIA2MEDIA extention detected, node :\\n' + atRule.parent);\n        result.warn('@extend was called to extend something in an @media from within another @media, this was safely ignored. For more information see the README under \\'Quirks\\'', {node: atRule});\n        return true;\n      }\n    }\n\n    function hasMediaAncestor(node) {\n      var parent = node.parent;\n      if (parent === undefined) {\n        return false;\n      }\n      if (parent.type === 'atrule' && parent.name === 'media') {\n        return true;\n      }\n      if (parent.type !== 'root') {\n        return hasMediaAncestor(parent);\n      }\n    }\n\n    function uniqreq(a) {\n      var seen = {};\n      return a.filter(function(item) {\n        return seen.hasOwnProperty(item) ? false : (seen[item] = true);\n      });\n    }\n\n    function safeCopyDeclarations(nodeOrigin, nodeDest) {\n      nodeOrigin.nodes.forEach(function(node) {\n        if (isBadDefinitionNode(node)) return;\n        if (nodeDest.some(function(decl) { return decl.prop === node.prop; })) {\n          // /*DEBUG*/appendout('./test/debugout.txt', '\\nsafeIgnored : ' + node + ' for ' + nodeDest.selector);\n          return;\n        }\n        // /*DEBUG*/appendout('./test/debugout.txt', '\\nnodeDest Nodes:\\n' + nodeDest.nodes);\n        var clone = node.clone();\n        //For lack of a better way to analyse how much tabbing is required:\n        if (nodeOrigin.parent === nodeDest.parent) {\n          clone.raws.before = node.raws.before;\n        } else {\n          clone.raws.before = node.raws.before + '\\t';\n        }\n        clone.raws.after = node.raws.after;\n        clone.raws.between = node.raws.between;\n        nodeDest.append(clone);\n      });\n    }\n\n    function formSubSelector(selArr, tgtSub) {\n      var selectorRetainer = selArr.slice();\n      for (var i = 0; i < selectorRetainer.length; i++) {\n        selectorRetainer[i] = selectorRetainer[i] + tgtSub;\n      }\n      return selectorRetainer;\n    }\n\n    function findUnresolvedExtendChild(nodeOrigin) {\n      var foundNode = {};\n      var foundBool = nodeOrigin.some(function (node) {\n        if (node.type === 'atrule' && extendingAtRules.indexOf(node.name) !== -1) {\n          foundNode = node;\n          return true;\n        }\n      });\n      return {\n        node: foundNode,\n        bool: foundBool\n      };\n    }\n\n    function extensionRecursionHandler(atRule, targetNode) {\n      var recursableRule = findUnresolvedExtendChild(targetNode);\n      var isTopOfRecurse = false;\n      if (recurseStack.length === 0) { isTopOfRecurse = true; }\n      if (!isAntiPatternCSS && css.index(atRule.parent) < css.index(targetNode)) {\n        // Throw this error only once, and only if it's an antipattern\n        // Make sure index could be obtained for atRule parent\n        if (css.index(atRule.parent) !== -1) {\n          // /*DEBUG*/appendout('./test/debugout.txt', '\\nANTIPATTERN CSS detected parent at: ' + css.index(atRule.parent) + ' target at: ' + css.index(targetNode) + ' parent :\\n' + atRule.parent);\n          result.warn('@extend is being used in an anti-pattern (extending things not yet defined). This is your first and final warning', {node: atRule});\n          isAntiPatternCSS = true;\n        // If index couldn't be obtained on atRule, check up the chain a step\n        } else if (css.index(atRule.parent.parent) !== -1 && css.index(atRule.parent.parent) < css.index(targetNode)) {\n          // /*DEBUG*/appendout('./test/debugout.txt', '\\nANTIPATTERN CSS detected parent\\'s parent at: ' + css.index(atRule.parent.parent) + ' target at: ' + css.index(targetNode) + ' parent :\\n' + atRule.parent);\n          result.warn('@extend is being used in an anti-pattern (extending things not yet defined). This is your first and final warning', {node: atRule});\n          isAntiPatternCSS = true;\n        }\n      }\n      if (recursableRule.bool) {\n        recurseStack.push(atRule.params);\n        while (recursableRule.bool) {\n          if (recurseStack.indexOf(recursableRule.node.params) === -1) {\n            // /*DEBUG*/appendout('./test/debugout.txt', '\\nRecursing from ' + atRule.parent.selector + ' on: ' + recursableRule.node.parent + '\\n\\\\/\\\\/\\\\/\\\\/\\\\/\\\\/\\\\/\\\\/ ' + recurseStack);\n            processExtension(recursableRule.node);\n            // /*DEBUG*/appendout('./test/debugout.txt', '\\n ^ ^ ^ ^ ^ ^ ^ ^ ' + recurseStack);\n            // In case of slippage in processExtention recursion, clean up @extend\n            if (recursableRule.node !== undefined) {\n              // /*DEBUG*/appendout('./test/debugout.txt', '\\npreventing slippage in recursion by removing resolved :' + recursableRule.node);\n              recursableRule.node.remove();\n            }\n            recursableRule = findUnresolvedExtendChild(targetNode);\n          } else {\n            result.warn('Infinite extension recursion detected', { node: atRule });\n            // /*DEBUG*/appendout('./test/debugout.txt', '\\nInfinite Recursion detected, recurseStack : ' + recurseStack + '\\n -- on :\\n' + atRule.parent + '\\n!!!!!!!!!!!!');\n            //clean out the recurse stack of duplicates (from early aborts like this) before dropping\n            recurseStack = uniqreq(recurseStack);\n            return false;\n          }\n        }\n\n        // /*DEBUG*/appendout('./test/debugout.txt', '\\npre-pop recurseStack : ' + recurseStack);\n        if (recurseStack.pop() !== atRule.params && recurseStack.indexOf(atRule.params) === -1) {\n          result.warn('Detected critically mis-aligned recursion stack! (Please post your CSS in a github issue, this shouldn\\'t ever happen!)', { node: atRule });\n          // /*DEBUG*/appendout('./test/debugout.txt', '\\n!!!!!!!!!!!!CRITICALLY MISALIGNED RECURSE STACK\\nexpected : ' + atRule.params + '\\npost-pop recurseStack : ' + recurseStack);\n        }\n        //Empty history if this is top of a recursion (as process preserves detections as it backs-out)\n        if (isTopOfRecurse) {\n          recurseStack = [];\n          // /*DEBUG*/appendout('./test/debugout.txt', '\\nrecurseStack dumped, at top');\n        }\n        return true;\n      }\n    }\n\n    function findBrotherSubClass(nodeOrigin, tgtSub) {\n      var foundNode = {};\n      var foundBool = nodeOrigin.parent.some(function (node) {\n        if (node.selectors) {\n          var seldiff = node.selectors;\n          var selectorAccumulator = nodeOrigin.selectors;\n          for (var x = 0; x < selectorAccumulator.length; x++) {\n            selectorAccumulator[x] = selectorAccumulator[x] + tgtSub;\n          }\n          if (node !== nodeOrigin && selectorAccumulator.length === node.selectors.length) {\n            seldiff = seldiff.concat(selectorAccumulator);\n            seldiff = uniqreq(seldiff);\n            // /*DEBUG*/appendout('./test/debugout.txt', '\\nseldiff : ' + seldiff + '\\n\\tBetween:\\n' + node.selectors + '\\n\\tand:\\n' + selectorAccumulator);\n            if (seldiff.length === selectorAccumulator.length) {\n              foundNode = node;\n              return true;\n            }\n          }\n        }\n      });\n      return {\n        node: foundNode,\n        bool: foundBool\n      };\n    }\n  };\n});\n"]}