{"version":3,"sources":["jsdelivr-header.js","/npm/@writetome51/array-replace-adjacent-items@2.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNQ,mDACF,iEACE,6CACF,wDAOC,SAAS,sBAAsB,EAAe,EAAmB,EAAW,GAClF,yCAAyC,EAAe,EAAmB,GAC3E,+CAA+C,EAAe,EAAmB,EAAM,QACvF,EAAM,OAAO,EAAe,KAAsB,EACnD","file":"/npm/@writetome51/array-replace-adjacent-items@2.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@writetome51/array-replace-adjacent-items@2.0.0/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","import {errorIfArrayTooShortToMeetAdjacentItemsRequest}\n\tfrom 'error-if-array-too-short-to-meet-adjacent-items-request';\nimport {errorIfIndex_howMany_orArray_areNotValid}\n\tfrom 'error-if-index-how-many-or-array-are-not-valid';\n\n\n// Use this function as a more reliable alternative to Array.splice() when only\n// replacing items in `array`. Strictly validates args.\n// `startingIndex` can be negative or positive.\n\nexport function _replaceAdjacentItems(startingIndex, numItemsToReplace, newValues, array) {\n\terrorIfIndex_howMany_orArray_areNotValid(startingIndex, numItemsToReplace, array);\n\terrorIfArrayTooShortToMeetAdjacentItemsRequest(startingIndex, numItemsToReplace, array.length);\n\tarray.splice(startingIndex, numItemsToReplace, ...newValues);\n}\n"]}