Liferay.Loader.define("data-engine-js-components-web@1.0.79/js/utils/repeatable.es",["module","exports","require"],(function(e,n,t){window;{Object.defineProperty(n,"__esModule",{value:!0}),n.parseName=a,n.generateName=function(e,n={}){const t=a(e),{editingLanguageId:d=t.editingLanguageId,fieldName:c=t.fieldName,instanceId:r=t.instanceId,portletNamespace:i=t.portletNamespace,repeatedIndex:o=t.repeatedIndex}=n;return"".concat(i,"ddm$$").concat(c,"$").concat(r,"$").concat(o,"$$").concat(d)},n.parseNestedFieldName=d,n.generateNestedFieldName=function(e,n){const t=a(n);let c=d(e);c.fieldName||(c=a(e));const{fieldName:r,instanceId:i,portletNamespace:o,repeatedIndex:s}=c;return[o,"ddm$$",t.fieldName,"$",t.instanceId,"$",t.repeatedIndex,"#",r,"$",i,"$",s,"$$",c.locale||c.editingLanguageId].join("")},n.getRepeatedIndex=function(e){let n;n=t.test(e)?d(e):a(e);return n.repeatedIndex};const e=/(_\w+_)ddm\$\$(.+)\$(\w+)\$(\d+)\$\$(\w+)/,t=/(_\w+_)ddm\$\$(.+)\$(\w+)\$(\d+)#(.+)\$(\w+)\$(\d+)\$\$(\w+)/;function a(n){const t=e.exec(n);return t?{editingLanguageId:t[5],fieldName:t[2],instanceId:t[3],portletNamespace:t[1],repeatedIndex:Number(t[4])}:{}}function d(e){let n={};const a=t.exec(e);return a&&(n={fieldName:a[5],instanceId:a[6],locale:a[8],parentFieldName:a[2],parentInstanceId:a[3],parentRepeatedIndex:Number(a[4]),portletNamespace:a[1],repeatedIndex:Number(a[7])}),n}}}));
//# sourceMappingURL=repeatable.es.js.map