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IAAMwB,EAAM,MAAQ,CACrE,CAGA,SAASV,IACP,IAAIb,SAASwB,eAAe,qBAA5B,CACA,IAAIrB,EAAQ,CACV,qBACE,sBACA,wCACA,gBACA,iBACA,2BACA,0BACF,IACA,yBACE,iBACF,IACA,2CACE,oBACF,KAAMzK,KAAK,IAET+L,EAAMzB,SAASC,cAAc,SACjCwB,EAAIC,KAAO,WACXD,EAAIE,GAAK,oBACTF,EAAI/B,UAAYS,EAChBH,SAAS4B,KAAKxB,YAAYqB,EArB8B,CAsB1D,CACF,GA1NsB,8BAStB,CAfA,CAeoB,kBAAX,EAAAzE,GAAsB,EAAAA,E","sources":["webpack://app/./app/assets/javascripts/templates/products/myoc_tile.jst.eco","webpack://app/./app/assets/javascripts/templates/products/tile.jst.eco","webpack://app/./app/assets/javascripts/views/products/select.js","webpack://app/./app/assets/javascripts/templates/products/select.jst.eco","webpack://app/./app/assets/javascripts/templates/products/select_products.jst.eco","webpack://app/./node_modules/react-select/dist/useCreatable-84008237.esm.js","webpack://app/./node_modules/react-select/creatable/dist/react-select-creatable.esm.js","webpack://app/./node_modules/textfit/textFit.js"],"sourcesContent":["export default function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n __out.push('
\\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}","export default function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n __out.push('\\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}","import _templates_products_select_products_ from 'templates/products/select_products'\nimport _templates_products_myoc_tile_ from 'templates/products/myoc_tile'\nimport _templates_products_select_ from 'templates/products/select'\n/* global $, JST */\nimport { defaults, select } from 'underscore'\nimport textFit from 'textfit'\nimport DOMPurify from 'dompurify'\nimport Product from 'models/product'\nimport PagedAppendingCollection from 'collections/paged_appending'\nimport BaseView from 'views/base'\nimport { createSection } from 'helpers/section'\n\nexport default class SelectProduct extends BaseView {\n events () {\n return {\n 'click .create-section': 'onCreateSectionClicked',\n 'click .product-levels a': 'onLevelClicked',\n }\n }\n\n initialize (options) {\n super.initialize(options)\n defaults(this.options, {\n educator: true,\n search: true,\n level: null,\n promotional: false,\n })\n defaults(this.options, { buildCourse: this.options.educator })\n\n this.products = new PagedAppendingCollection([], {\n url: `/products/featured?educator=${this.options.educator ? '1' : '0'}`,\n instanceModel: Product,\n })\n this.level = this.options.level // null for all levels\n\n this.listenTo(this.products, 'reset', this.render)\n window.addEventListener('resize', this.onWindowResize.bind(this))\n this.products.fetch()\n }\n\n render () {\n this.$el.html(_templates_products_select_({ options: this.options }))\n this.slider = this.$('.slidercontainer')\n\n this.renderProducts()\n this.fitTitles()\n return this\n }\n\n renderPromotional () {\n this.slider.prepend(_templates_products_myoc_tile_())\n }\n\n renderProducts () {\n const displayProducts = select(this.products.models, (product) => {\n return !this.level || product.get('levels').includes(this.level)\n })\n\n this.slider.html(\n _templates_products_select_products_({\n products: displayProducts,\n DOMPurify,\n })\n )\n if (this.options.promotional) {\n this.renderPromotional()\n }\n }\n\n fitTitles () {\n const text = this.$('.course-tile .cover')\n if (text) {\n textFit(text, { multiLine: true, maxFontSize: 42 })\n }\n }\n\n cleanup () {\n window.removeEventListener('resize', this.onWindowResize.bind(this))\n }\n\n //\n // event handlers\n //\n onCreateSectionClicked (e) {\n createSection(null, { allowCopy: false })\n return false\n }\n\n onLevelClicked (e) {\n const target = $(e.currentTarget)\n this.level = target.data('level')\n\n this.$('.product-levels a').removeClass('selected')\n target.addClass('selected')\n\n this.renderProducts()\n }\n\n onWindowResize () {\n this.fitTitles()\n }\n}\n","export default function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n __out.push('\n innerSpan.style['display'] = 'inline-block';\n innerSpan.innerHTML = originalHTML;\n el.innerHTML = '';\n el.appendChild(innerSpan);\n } else {\n // Reprocessing.\n innerSpan = el.querySelector('span.textFitted');\n // Remove vertical align if we're reprocessing.\n if (hasClass(innerSpan, 'textFitAlignVert')){\n innerSpan.className = innerSpan.className.replace('textFitAlignVert', '');\n innerSpan.style['height'] = '';\n el.className.replace('textFitAlignVertFlex', '');\n }\n }\n\n // Prepare & set alignment\n if (settings.alignHoriz) {\n el.style['text-align'] = 'center';\n innerSpan.style['text-align'] = 'center';\n }\n\n // Check if this string is multiple lines\n // Not guaranteed to always work if you use wonky line-heights\n var multiLine = settings.multiLine;\n if (settings.detectMultiLine && !multiLine &&\n innerSpan.scrollHeight >= parseInt(window.getComputedStyle(innerSpan)['font-size'], 10) * 2){\n multiLine = true;\n }\n\n // If we're not treating this as a multiline string, don't let it wrap.\n if (!multiLine) {\n el.style['white-space'] = 'nowrap';\n }\n\n low = settings.minFontSize;\n high = settings.maxFontSize;\n\n // Binary search for highest best fit\n var size = low;\n while (low <= high) {\n mid = (high + low) >> 1;\n innerSpan.style.fontSize = mid + 'px';\n if(innerSpan.scrollWidth <= originalWidth && (settings.widthOnly || innerSpan.scrollHeight <= originalHeight)){\n size = mid;\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n // await injection point\n }\n // found, updating font if differs:\n if( innerSpan.style.fontSize != size + 'px' ) innerSpan.style.fontSize = size + 'px';\n\n // Our height is finalized. If we are aligning vertically, set that up.\n if (settings.alignVert) {\n addStyleSheet();\n var height = innerSpan.scrollHeight;\n if (window.getComputedStyle(el)['position'] === \"static\"){\n el.style['position'] = 'relative';\n }\n if (!hasClass(innerSpan, \"textFitAlignVert\")){\n innerSpan.className = innerSpan.className + \" textFitAlignVert\";\n }\n innerSpan.style['height'] = height + \"px\";\n if (settings.alignVertWithFlexbox && !hasClass(el, \"textFitAlignVertFlex\")) {\n el.className = el.className + \" textFitAlignVertFlex\";\n }\n }\n }\n\n // Calculate height without padding.\n function innerHeight(el){\n var style = window.getComputedStyle(el, null);\n return el.clientHeight -\n parseInt(style.getPropertyValue('padding-top'), 10) -\n parseInt(style.getPropertyValue('padding-bottom'), 10);\n }\n\n // Calculate width without padding.\n function innerWidth(el){\n var style = window.getComputedStyle(el, null);\n return el.clientWidth -\n parseInt(style.getPropertyValue('padding-left'), 10) -\n parseInt(style.getPropertyValue('padding-right'), 10);\n }\n\n //Returns true if it is a DOM element\n function isElement(o){\n return (\n typeof HTMLElement === \"object\" ? o instanceof HTMLElement : //DOM2\n o && typeof o === \"object\" && o !== null && o.nodeType === 1 && typeof o.nodeName===\"string\"\n );\n }\n\n function hasClass(element, cls) {\n return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;\n }\n\n // Better than a stylesheet dependency\n function addStyleSheet() {\n if (document.getElementById(\"textFitStyleSheet\")) return;\n var style = [\n \".textFitAlignVert{\",\n \"position: absolute;\",\n \"top: 0; right: 0; bottom: 0; left: 0;\",\n \"margin: auto;\",\n \"display: flex;\",\n \"justify-content: center;\",\n \"flex-direction: column;\",\n \"}\",\n \".textFitAlignVertFlex{\",\n \"display: flex;\",\n \"}\",\n \".textFitAlignVertFlex .textFitAlignVert{\",\n \"position: static;\",\n \"}\",].join(\"\");\n\n var css = document.createElement(\"style\");\n css.type = \"text/css\";\n css.id = \"textFitStyleSheet\";\n css.innerHTML = style;\n document.body.appendChild(css);\n }\n}));\n"],"names":["__obj","__out","__objSafe","safe","__escape","escape","value","ecoSafe","result","String","replace","push","call","this","join","__sanitize","product","url","get","DOMPurify","sanitize","isAdaptive","authorNames","SelectProduct","BaseView","events","initialize","options","super","defaults","educator","search","level","promotional","buildCourse","products","PagedAppendingCollection","instanceModel","Product","listenTo","render","window","addEventListener","onWindowResize","bind","fetch","$el","html","_templates_products_select_","slider","$","renderProducts","fitTitles","renderPromotional","prepend","_templates_products_myoc_tile_","displayProducts","select","models","includes","_this","length","forEach","_templates_products_select_products_","text","textFit","multiLine","maxFontSize","cleanup","removeEventListener","onCreateSectionClicked","e","createSection","allowCopy","onLevelClicked","target","currentTarget","data","removeClass","addClass","_excluded","compareOption","option","arguments","undefined","accessors","candidate","toLowerCase","optionValue","getOptionValue","optionLabel","getOptionLabel","builtins","formatCreateLabel","inputValue","concat","isValidNewOption","selectValue","selectOptions","some","getNewOptionData","label","__isNew__","CreatableSelect$1","forwardRef","props","ref","_ref","_ref$allowCreateWhile","allowCreateWhileLoading","_ref$createOptionPosi","createOptionPosition","_ref$formatCreateLabe","_ref$isValidNewOption","_ref$getNewOptionData","onCreateOption","_ref$options","propsOptions","propsOnChange","restSelectProps","_restSelectProps$getO","getOptionValue$1","_restSelectProps$getO2","getOptionLabel$1","isLoading","isMulti","name","newOption","onChange","creatableProps","u","selectProps","g","useMemo","useCallback","newValue","actionMeta","action","valueArray","Array","isArray","newOptionData","newActionMeta","S","defaultSettings","alignVert","alignHoriz","detectMultiLine","minFontSize","reProcess","widthOnly","alignVertWithFlexbox","els","settings","key","hasOwnProperty","toArray","elType","Object","prototype","toString","i","processItem","el","isElement","getAttribute","innerSpan","originalHeight","originalHTML","originalWidth","low","mid","high","setAttribute","innerHTML","innerWidth","innerHeight","Error","outerHTML","indexOf","document","createElement","className","style","appendChild","hasClass","querySelector","scrollHeight","parseInt","getComputedStyle","size","fontSize","scrollWidth","addStyleSheet","height","clientHeight","getPropertyValue","clientWidth","o","HTMLElement","nodeType","nodeName","element","cls","getElementById","css","type","id","body"],"sourceRoot":""}