shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$container$bounds$getLocalBounds = function(global, require, module, exports) {
  function _getLocalBounds(target, bounds, parentTransform, rootContainer, isRoot) {
    if (isRoot) {
      isRoot = matrixAndBoundsPool.matrixPool.get(), isRoot = parentTransform.copyTo(isRoot);
    } else {
      if (!target.visible || !target.measurable) {
        return;
      }
      target.updateLocalTransform();
      var localTransform = target.localTransform;
      isRoot = matrixAndBoundsPool.matrixPool.get();
      isRoot.appendFrom(localTransform, parentTransform);
    }
    parentTransform = bounds;
    (localTransform = !!target.effects.length) && (bounds = matrixAndBoundsPool.boundsPool.get().clear());
    if (target.boundsArea) {
      bounds.addRect(target.boundsArea, isRoot);
    } else {
      target.renderPipeId && (bounds.matrix = isRoot, bounds.addBounds(target.bounds));
      const children = target.children;
      for (let i = 0; i < children.length; i++) {
        _getLocalBounds(children[i], bounds, isRoot, rootContainer, !1);
      }
    }
    if (localTransform) {
      for (localTransform = 0; localTransform < target.effects.length; localTransform++) {
        target.effects[localTransform].addLocalBounds?.(bounds, rootContainer);
      }
      parentTransform.addBounds(bounds, Matrix.Matrix.IDENTITY);
      matrixAndBoundsPool.boundsPool.return(bounds);
    }
    matrixAndBoundsPool.matrixPool.return(isRoot);
  }
  var Matrix = require("module$node_modules$pixi_DOT_js$lib$maths$matrix$Matrix"), matrixAndBoundsPool = require("module$node_modules$pixi_DOT_js$lib$scene$container$bounds$utils$matrixAndBoundsPool");
  "use strict";
  exports.getLocalBounds = function(target, bounds, relativeMatrix) {
    bounds.clear();
    relativeMatrix || (relativeMatrix = Matrix.Matrix.IDENTITY);
    _getLocalBounds(target, bounds, relativeMatrix, target, !0);
    bounds.isValid || bounds.set(0, 0, 0, 0);
    return bounds;
  };
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$container$bounds$getLocalBounds.js.map
