{"version":3,"file":"SavedConfigInfo.js","sources":["requirejs/Customization/SavedConfigInfo.js"],"sourcesContent":["define([\"require\", \"exports\", \"custom-imprinting/LocationSummary\", \"UI/Context\"], function (require, exports, LocationSummary_1, Context_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.SavedConfigInfo = void 0;\n class SavedConfigInfo {\n constructor(data) {\n ko.mapping.fromJS(data, {\n CustomImprintings: {\n create: options => {\n if (options.data === null || options.data.Colors === null) {\n return ko.observable(null);\n }\n options.data.Colors = options.data.Colors.map(color => new LocationSummary_1.LocationColorSummaryViewModel(color));\n return ko.observable(new LocationSummary_1.LocationSummaryViewModel(options.data));\n }\n }\n }, this);\n this.Currency = Context_1.default.Currency;\n this.ExactFitSizeTemplate = ko.pureComputed(() => {\n const exactFitLength = this.ExactFitLength();\n const exactFitWidth = this.ExactFitWidth();\n const exactFitDepth = this.ExactFitDepth();\n if (exactFitLength || exactFitWidth || exactFitDepth) {\n return `
\n
Custom Stone Size:
\n
\n
Center:
\n
\n ${exactFitLength ? `${exactFitLength}` : ''}\n ${exactFitLength && (exactFitWidth || exactFitDepth) ? 'x' : ''}\n ${exactFitWidth ? `${exactFitWidth}` : ''}\n ${exactFitWidth && exactFitDepth ? 'x' : ''}\n ${exactFitDepth ? `${exactFitDepth}` : ''}\n mm\n
\n
\n
`;\n }\n return '';\n });\n }\n }\n exports.SavedConfigInfo = SavedConfigInfo;\n class EngravingInfo {\n }\n class StoneConfigInfo {\n }\n});\n//# sourceMappingURL=SavedConfigInfo.js.map"],"names":["define","require","exports","LocationSummary_1","Context_1","Object","defineProperty","value","SavedConfigInfo","constructor","data","ko","mapping","fromJS","CustomImprintings","create","options","Colors","observable","map","color","LocationColorSummaryViewModel","LocationSummaryViewModel","this","Currency","default","ExactFitSizeTemplate","pureComputed","exactFitLength","ExactFitLength","exactFitWidth","ExactFitWidth","exactFitDepth","ExactFitDepth"],"mappings":"AAAAA,OAAO,CAAC,UAAW,UAAW,oCAAqC,cAAe,SAAUC,EAASC,EAASC,EAAmBC,gBAE7HC,OAAOC,eAAeJ,EAAS,aAAc,CAAEK,OAAO,IACtDL,EAAQM,qBAAkB,EAuC1BN,EAAQM,sBArCJC,YAAYC,GACRC,GAAGC,QAAQC,OAAOH,EAAM,CACpBI,kBAAmB,CACfC,OAAQC,GACiB,OAAjBA,EAAQN,MAAyC,OAAxBM,EAAQN,KAAKO,OAC/BN,GAAGO,WAAW,OAEzBF,EAAQN,KAAKO,OAASD,EAAQN,KAAKO,OAAOE,IAAIC,GAAS,IAAIjB,EAAkBkB,8BAA8BD,IACpGT,GAAGO,WAAW,IAAIf,EAAkBmB,yBAAyBN,EAAQN,UAGrFa,MACHA,KAAKC,SAAWpB,EAAUqB,QAAQD,SAClCD,KAAKG,qBAAuBf,GAAGgB,aAAa,KACxC,IAAMC,EAAiBL,KAAKM,iBACtBC,EAAgBP,KAAKQ,gBACrBC,EAAgBT,KAAKU,gBAC3B,OAAIL,GAAkBE,GAAiBE;;;;;8BAMzBJ,EAAiB,GAAGA,EAAmB;8BACvCA,IAAmBE,GAAiBE,GAAiB,IAAM;8BAC3DF,EAAgB,GAAGA,EAAkB;8BACrCA,GAAiBE,EAAgB,IAAM;8BACvCA,EAAgB,GAAGA,EAAkB;;;;wBAM5C"}