/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../chunks/_rollupPluginBabelHelpers","../CIMCursor","../CurveHelper"],(function(e,t,u,n){"use strict";let i=function(){function e(){}return e.local=function(){return null===e.instance&&(e.instance=new e),e.instance},e.prototype.execute=function(e,t,u,n){return new r(e,t,u)},e}();i.instance=null;let r=function(e){function u(t,u,i){var r;return(r=e.call(this,t,!0,!0)||this)._curveHelper=new n.CurveHelper,r._beginCut=(void 0!==u.beginCut?u.beginCut:1)*i,r._endCut=(void 0!==u.endCut?u.endCut:1)*i,r._middleCut=(void 0!==u.middleCut?u.middleCut:0)*i,r._invert=void 0!==u.invert&&u.invert,r._beginCut<0&&(r._beginCut=0),r._endCut<0&&(r._endCut=0),r._middleCut<0&&(r._middleCut=0),r}return t._inheritsLoose(u,e),u.prototype.processPath=function(e){const t=this._beginCut,u=this._endCut,n=this._middleCut,i=this._curveHelper.calculatePathLength(e),r=[];if(this._invert)if(0===t&&0===u&&0===n);else if(t+u+n>=i)r.push(e);else{let l=this._curveHelper.getSubCurve(e,0,t);l&&r.push(l),l=this._curveHelper.getSubCurve(e,.5*(i-n),.5*(i+n)),l&&r.push(l),l=this._curveHelper.getSubCurve(e,i-u,u),l&&r.push(l)}else if(0===t&&0===u&&0===n)r.push(e);else if(t+u+n>=i);else if(0===n){const n=this._curveHelper.getSubCurve(e,t,i-u);n&&r.push(n)}else{let l=this._curveHelper.getSubCurve(e,t,.5*(i-n));l&&r.push(l),l=this._curveHelper.getSubCurve(e,.5*(i+n),i-u),l&&r.push(l)}return 0===r.length?null:{paths:r}},u}(u.PathGeometryCursor);e.EffectCut=i,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
