{"ast":null,"code":"import { calcRelativeOffset } from '../../../motion/features/layout/utils.js';\nimport { eachAxis } from '../../../utils/each-axis.js';\nimport { removeBoxTransforms } from '../../../utils/geometry/delta-apply.js';\n\n/**\n * Returns a boolean stating whether or not we converted the projection\n * to relative projection.\n */\nfunction convertToRelativeProjection(visualElement, isLayoutDrag) {\n  if (isLayoutDrag === void 0) {\n    isLayoutDrag = true;\n  }\n  var projectionParent = visualElement.getProjectionParent();\n  if (!projectionParent) return false;\n  var offset;\n  if (isLayoutDrag) {\n    offset = calcRelativeOffset(projectionParent.projection.target, visualElement.projection.target);\n    removeBoxTransforms(offset, projectionParent.getLatestValues());\n  } else {\n    offset = calcRelativeOffset(projectionParent.getLayoutState().layout, visualElement.getLayoutState().layout);\n  }\n  eachAxis(function (axis) {\n    return visualElement.setProjectionTargetAxis(axis, offset[axis].min, offset[axis].max, true);\n  });\n  return true;\n}\nexport { convertToRelativeProjection };","map":{"version":3,"names":["calcRelativeOffset","eachAxis","removeBoxTransforms","convertToRelativeProjection","visualElement","isLayoutDrag","projectionParent","getProjectionParent","offset","projection","target","getLatestValues","getLayoutState","layout","axis","setProjectionTargetAxis","min","max"],"sources":["C:/ldt/LDT/management/node_modules/framer-motion/dist/es/render/dom/projection/convert-to-relative.js"],"sourcesContent":["import { calcRelativeOffset } from '../../../motion/features/layout/utils.js';\nimport { eachAxis } from '../../../utils/each-axis.js';\nimport { removeBoxTransforms } from '../../../utils/geometry/delta-apply.js';\n\n/**\n * Returns a boolean stating whether or not we converted the projection\n * to relative projection.\n */\nfunction convertToRelativeProjection(visualElement, isLayoutDrag) {\n    if (isLayoutDrag === void 0) { isLayoutDrag = true; }\n    var projectionParent = visualElement.getProjectionParent();\n    if (!projectionParent)\n        return false;\n    var offset;\n    if (isLayoutDrag) {\n        offset = calcRelativeOffset(projectionParent.projection.target, visualElement.projection.target);\n        removeBoxTransforms(offset, projectionParent.getLatestValues());\n    }\n    else {\n        offset = calcRelativeOffset(projectionParent.getLayoutState().layout, visualElement.getLayoutState().layout);\n    }\n    eachAxis(function (axis) {\n        return visualElement.setProjectionTargetAxis(axis, offset[axis].min, offset[axis].max, true);\n    });\n    return true;\n}\n\nexport { convertToRelativeProjection };\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,0CAA0C;AAC7E,SAASC,QAAQ,QAAQ,6BAA6B;AACtD,SAASC,mBAAmB,QAAQ,wCAAwC;;AAE5E;AACA;AACA;AACA;AACA,SAASC,2BAA2BA,CAACC,aAAa,EAAEC,YAAY,EAAE;EAC9D,IAAIA,YAAY,KAAK,KAAK,CAAC,EAAE;IAAEA,YAAY,GAAG,IAAI;EAAE;EACpD,IAAIC,gBAAgB,GAAGF,aAAa,CAACG,mBAAmB,CAAC,CAAC;EAC1D,IAAI,CAACD,gBAAgB,EACjB,OAAO,KAAK;EAChB,IAAIE,MAAM;EACV,IAAIH,YAAY,EAAE;IACdG,MAAM,GAAGR,kBAAkB,CAACM,gBAAgB,CAACG,UAAU,CAACC,MAAM,EAAEN,aAAa,CAACK,UAAU,CAACC,MAAM,CAAC;IAChGR,mBAAmB,CAACM,MAAM,EAAEF,gBAAgB,CAACK,eAAe,CAAC,CAAC,CAAC;EACnE,CAAC,MACI;IACDH,MAAM,GAAGR,kBAAkB,CAACM,gBAAgB,CAACM,cAAc,CAAC,CAAC,CAACC,MAAM,EAAET,aAAa,CAACQ,cAAc,CAAC,CAAC,CAACC,MAAM,CAAC;EAChH;EACAZ,QAAQ,CAAC,UAAUa,IAAI,EAAE;IACrB,OAAOV,aAAa,CAACW,uBAAuB,CAACD,IAAI,EAAEN,MAAM,CAACM,IAAI,CAAC,CAACE,GAAG,EAAER,MAAM,CAACM,IAAI,CAAC,CAACG,GAAG,EAAE,IAAI,CAAC;EAChG,CAAC,CAAC;EACF,OAAO,IAAI;AACf;AAEA,SAASd,2BAA2B","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}