{"ast":null,"code":"// @ts-check\n/**\n * We must remap all the old bits to new bits for each set variant\n * Only arbitrary variants are considered as those are the only\n * ones that need to be re-sorted at this time\n *\n * An iterated process that removes and sets individual bits simultaneously\n * will not work because we may have a new bit that is also a later old bit\n * This means that we would be removing a previously set bit which we don't\n * want to do\n *\n * For example (assume `bN` = `1<<N`)\n * Given the \"total\" mapping `[[b1, b3], [b2, b4], [b3, b1], [b4, b2]]`\n * The mapping is \"total\" because:\n * 1. Every input and output is accounted for\n * 2. All combinations are unique\n * 3. No one input maps to multiple outputs and vice versa\n * And, given an offset with all bits set:\n * V = b1 | b2 | b3 | b4\n *\n * Let's explore the issue with removing and setting bits simultaneously:\n * V & ~b1 | b3 = b2 | b3 | b4\n * V & ~b2 | b4 = b3 | b4\n * V & ~b3 | b1 = b1 | b4\n * V & ~b4 | b2 = b1 | b2\n *\n * As you can see, we end up with the wrong result.\n * This is because we're removing a bit that was previously set.\n * And, thus the final result is missing b3 and b4.\n *\n * Now, let's explore the issue with removing the bits first:\n * V & ~b1 = b2 | b3 | b4\n * V & ~b2 = b3 | b4\n * V & ~b3 = b4\n * V & ~b4 = 0\n *\n * And then setting the bits:\n * V | b3 = b3\n * V | b4 = b3 | b4\n * V | b1 = b1 | b3 | b4\n * V | b2 = b1 | b2 | b3 | b4\n *\n * We get the correct result because we're not removing any bits that were\n * previously set thus properly remapping the bits to the new order\n *\n * To collect this into a single operation that can be done simultaneously\n * we must first create a mask for the old bits that are set and a mask for\n * the new bits that are set. Then we can remove the old bits and set the new\n * bits simultaneously in a \"single\" operation like so:\n * OldMask = b1 | b2 | b3 | b4\n * NewMask = b3 | b4 | b1 | b2\n *\n * So this:\n * V & ~oldMask | newMask\n *\n * Expands to this:\n * V & ~b1 & ~b2 & ~b3 & ~b4 | b3 | b4 | b1 | b2\n *\n * Which becomes this:\n * b1 | b2 | b3 | b4\n *\n * Which is the correct result!\n *\n * @param {bigint} num\n * @param {[bigint, bigint][]} mapping\n */\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nObject.defineProperty(exports, \"remapBitfield\", {\n  enumerable: true,\n  get: function () {\n    return remapBitfield;\n  }\n});\nfunction remapBitfield(num, mapping) {\n  // Create masks for the old and new bits that are set\n  let oldMask = 0n;\n  let newMask = 0n;\n  for (let [oldBit, newBit] of mapping) {\n    if (num & oldBit) {\n      oldMask = oldMask | oldBit;\n      newMask = newMask | newBit;\n    }\n  }\n  // Remove all old bits\n  // Set all new bits\n  return num & ~oldMask | newMask;\n}","map":{"version":3,"names":["Object","defineProperty","exports","value","enumerable","get","remapBitfield","num","mapping","oldMask","newMask","oldBit","newBit"],"sources":["C:/Users/user/Desktop/000newport/node_modules/tailwindcss/lib/lib/remap-bitfield.js"],"sourcesContent":["// @ts-check\n/**\n * We must remap all the old bits to new bits for each set variant\n * Only arbitrary variants are considered as those are the only\n * ones that need to be re-sorted at this time\n *\n * An iterated process that removes and sets individual bits simultaneously\n * will not work because we may have a new bit that is also a later old bit\n * This means that we would be removing a previously set bit which we don't\n * want to do\n *\n * For example (assume `bN` = `1<<N`)\n * Given the \"total\" mapping `[[b1, b3], [b2, b4], [b3, b1], [b4, b2]]`\n * The mapping is \"total\" because:\n * 1. Every input and output is accounted for\n * 2. All combinations are unique\n * 3. No one input maps to multiple outputs and vice versa\n * And, given an offset with all bits set:\n * V = b1 | b2 | b3 | b4\n *\n * Let's explore the issue with removing and setting bits simultaneously:\n * V & ~b1 | b3 = b2 | b3 | b4\n * V & ~b2 | b4 = b3 | b4\n * V & ~b3 | b1 = b1 | b4\n * V & ~b4 | b2 = b1 | b2\n *\n * As you can see, we end up with the wrong result.\n * This is because we're removing a bit that was previously set.\n * And, thus the final result is missing b3 and b4.\n *\n * Now, let's explore the issue with removing the bits first:\n * V & ~b1 = b2 | b3 | b4\n * V & ~b2 = b3 | b4\n * V & ~b3 = b4\n * V & ~b4 = 0\n *\n * And then setting the bits:\n * V | b3 = b3\n * V | b4 = b3 | b4\n * V | b1 = b1 | b3 | b4\n * V | b2 = b1 | b2 | b3 | b4\n *\n * We get the correct result because we're not removing any bits that were\n * previously set thus properly remapping the bits to the new order\n *\n * To collect this into a single operation that can be done simultaneously\n * we must first create a mask for the old bits that are set and a mask for\n * the new bits that are set. Then we can remove the old bits and set the new\n * bits simultaneously in a \"single\" operation like so:\n * OldMask = b1 | b2 | b3 | b4\n * NewMask = b3 | b4 | b1 | b2\n *\n * So this:\n * V & ~oldMask | newMask\n *\n * Expands to this:\n * V & ~b1 & ~b2 & ~b3 & ~b4 | b3 | b4 | b1 | b2\n *\n * Which becomes this:\n * b1 | b2 | b3 | b4\n *\n * Which is the correct result!\n *\n * @param {bigint} num\n * @param {[bigint, bigint][]} mapping\n */ \"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n    value: true\n});\nObject.defineProperty(exports, \"remapBitfield\", {\n    enumerable: true,\n    get: function() {\n        return remapBitfield;\n    }\n});\nfunction remapBitfield(num, mapping) {\n    // Create masks for the old and new bits that are set\n    let oldMask = 0n;\n    let newMask = 0n;\n    for (let [oldBit, newBit] of mapping){\n        if (num & oldBit) {\n            oldMask = oldMask | oldBit;\n            newMask = newMask | newBit;\n        }\n    }\n    // Remove all old bits\n    // Set all new bits\n    return num & ~oldMask | newMask;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAI,YAAY;;AAChBA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EACzCC,KAAK,EAAE;AACX,CAAC,CAAC;AACFH,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,eAAe,EAAE;EAC5CE,UAAU,EAAE,IAAI;EAChBC,GAAG,EAAE,SAAAA,CAAA,EAAW;IACZ,OAAOC,aAAa;EACxB;AACJ,CAAC,CAAC;AACF,SAASA,aAAaA,CAACC,GAAG,EAAEC,OAAO,EAAE;EACjC;EACA,IAAIC,OAAO,GAAG,EAAE;EAChB,IAAIC,OAAO,GAAG,EAAE;EAChB,KAAK,IAAI,CAACC,MAAM,EAAEC,MAAM,CAAC,IAAIJ,OAAO,EAAC;IACjC,IAAID,GAAG,GAAGI,MAAM,EAAE;MACdF,OAAO,GAAGA,OAAO,GAAGE,MAAM;MAC1BD,OAAO,GAAGA,OAAO,GAAGE,MAAM;IAC9B;EACJ;EACA;EACA;EACA,OAAOL,GAAG,GAAG,CAACE,OAAO,GAAGC,OAAO;AACnC"},"metadata":{},"sourceType":"script","externalDependencies":[]}