{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/social-share-button.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","SocialShareButton","openUrl","url","width","height","opt","screen","open","share","el","$parent","appkey","desc","ga","get_tumblr_extra","hashtags","img","site","title","tumblr_params","via","via_str","whatsapp_app_url","getAttribute","document","querySelector","parentNode","encodeURIComponent","length","location","href","SocialShareWeChatButton","Error","qrcode","decodeURIComponent","header","footer","param","cutom_data","params","path","quote","source","this"],"mappings":"aACE,IAAIA,EAAmB,CAAC,EAGxB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,CAAC,GAUX,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,OACf,CAIAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,GAEhE,EAGAZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,GACvD,EAOArB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA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AO,IAAMD,CAC5B,EACAvC,kBAAkBC,QAAQ,8BAAiCkB,KAC3D,MACF,IAAK,SACHnB,kBAAkBC,QAAQ,oCAAsCC,EAAM,eAAgB,IAAK,KAC3F,MACF,IAAK,cACHF,kBAAkBC,QAAQ,4CAA8CC,EAAM,MAAQgB,EAAO,IAAK,KAClG,MACF,IAAK,WACHlB,kBAAkBC,QAAQ,sCAAwCiB,EAAQ,QAAUhB,GACpF,MACF,IAAK,eACHoB,EAAmB,wBAA0BJ,EAAQ,MAAQhB,EAC7DH,OAAOQ,KAAKe,EAAkB,QAC9B,MACF,IAAK,eACHtB,kBAAkBC,QAAQ,sCAAwCiB,EAAQ,MAAQhB,GAEtF,OAAO,CACT,EAGH,GAAEhC,KAAKyE,K","file":"js/social-share-button-81c13733702bc9901809.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 295);\n","(function() {\n window.SocialShareButton = {\n openUrl: function(url, width, height) {\n var left, opt, top;\n if (width == null) {\n width = 640;\n }\n if (height == null) {\n height = 480;\n }\n left = (screen.width / 2) - (width / 2);\n top = (screen.height * 0.3) - (height / 2);\n opt = \"width=\" + width + \",height=\" + height + \",left=\" + left + \",top=\" + top + \",menubar=no,status=no,location=no\";\n window.open(url, 'popup', opt);\n return false;\n },\n share: function(el) {\n var $parent, appkey, desc, ga, get_tumblr_extra, hashtags, img, site, title, tumblr_params, url, via, via_str, whatsapp_app_url;\n if (el.getAttribute === null) {\n el = document.querySelector(el);\n }\n site = el.getAttribute(\"data-site\");\n appkey = el.getAttribute(\"data-appkey\") || '';\n $parent = el.parentNode;\n title = encodeURIComponent(el.getAttribute(\"data-\" + site + \"-title\") || $parent.getAttribute('data-title') || '');\n img = encodeURIComponent($parent.getAttribute(\"data-img\") || '');\n url = encodeURIComponent($parent.getAttribute(\"data-url\") || '');\n via = encodeURIComponent($parent.getAttribute(\"data-via\") || '');\n desc = encodeURIComponent($parent.getAttribute(\"data-desc\") || ' ');\n ga = window[window['GoogleAnalyticsObject'] || 'ga'];\n if (typeof ga === 'function') {\n ga('send', 'event', 'Social Share Button', 'click', site);\n }\n if (url.length === 0) {\n url = encodeURIComponent(location.href);\n }\n switch (site) {\n case \"email\":\n location.href = \"mailto:?subject=\" + title + \"&body=\" + url;\n break;\n case \"weibo\":\n SocialShareButton.openUrl(\"http://service.weibo.com/share/share.php?url=\" + url + \"&type=3&pic=\" + img + \"&title=\" + title + \"&appkey=\" + appkey, 620, 370);\n break;\n case \"twitter\":\n hashtags = encodeURIComponent(el.getAttribute(\"data-\" + site + \"-hashtags\") || $parent.getAttribute(\"data-hashtags\") || '');\n via_str = '';\n if (via.length > 0) {\n via_str = \"&via=\" + via;\n }\n SocialShareButton.openUrl(\"https://twitter.com/intent/tweet?url=\" + url + \"&text=\" + title + \"&hashtags=\" + hashtags + via_str, 650, 300);\n break;\n case \"douban\":\n SocialShareButton.openUrl(\"http://shuo.douban.com/!service/share?href=\" + url + \"&name=\" + title + \"&image=\" + img + \"&sel=\" + desc, 770, 470);\n break;\n case \"facebook\":\n SocialShareButton.openUrl(\"http://www.facebook.com/sharer/sharer.php?u=\" + url, 555, 400);\n break;\n case \"qq\":\n SocialShareButton.openUrl(\"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=\" + url + \"&title=\" + title + \"&pics=\" + img + \"&summary=\" + desc + \"&site=\" + appkey);\n break;\n case \"google_bookmark\":\n SocialShareButton.openUrl(\"https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=\" + url + \"&title=\" + title);\n break;\n case \"delicious\":\n SocialShareButton.openUrl(\"https://del.icio.us/save?url=\" + url + \"&title=\" + title + \"&jump=yes&pic=\" + img);\n break;\n case \"pinterest\":\n SocialShareButton.openUrl(\"http://www.pinterest.com/pin/create/button/?url=\" + url + \"&media=\" + img + \"&description=\" + title);\n break;\n case \"linkedin\":\n SocialShareButton.openUrl(\"https://www.linkedin.com/shareArticle?mini=true&url=\" + url + \"&title=\" + title + \"&summary=\" + desc);\n break;\n case \"xing\":\n SocialShareButton.openUrl(\"https://www.xing.com/spi/shares/new?url=\" + url);\n break;\n case \"vkontakte\":\n SocialShareButton.openUrl(\"http://vk.com/share.php?url=\" + url + \"&title=\" + title + \"&image=\" + img);\n break;\n case \"odnoklassniki\":\n SocialShareButton.openUrl(\"https://connect.ok.ru/offer?url=\" + url + \"&title=\" + title + \"&description=\" + desc + \"&imageUrl=\" + img);\n break;\n case \"wechat\":\n if (!window.SocialShareWeChatButton) {\n throw new Error(\"You should require social-share-button/wechat to your application.js\");\n }\n window.SocialShareWeChatButton.qrcode({\n url: decodeURIComponent(url),\n header: el.getAttribute('title'),\n footer: el.getAttribute(\"data-wechat-footer\")\n });\n break;\n case \"tumblr\":\n get_tumblr_extra = function(param) {\n var cutom_data;\n cutom_data = el.getAttribute(\"data-\" + param);\n if (cutom_data) {\n return encodeURIComponent(cutom_data);\n }\n };\n tumblr_params = function() {\n var params, path, quote, source;\n path = get_tumblr_extra('type') || 'link';\n params = (function() {\n switch (path) {\n case 'text':\n title = get_tumblr_extra('title') || title;\n return \"title=\" + title;\n case 'photo':\n title = get_tumblr_extra('caption') || title;\n source = get_tumblr_extra('source') || img;\n return \"caption=\" + title + \"&source=\" + source;\n case 'quote':\n quote = get_tumblr_extra('quote') || title;\n source = get_tumblr_extra('source') || '';\n return \"quote=\" + quote + \"&source=\" + source;\n default:\n title = get_tumblr_extra('title') || title;\n url = get_tumblr_extra('url') || url;\n return \"name=\" + title + \"&url=\" + url;\n }\n })();\n return \"/\" + path + \"?\" + params;\n };\n SocialShareButton.openUrl(\"http://www.tumblr.com/share\" + (tumblr_params()));\n break;\n case \"reddit\":\n SocialShareButton.openUrl(\"http://www.reddit.com/submit?url=\" + url + \"&newwindow=1\", 555, 400);\n break;\n case \"hacker_news\":\n SocialShareButton.openUrl(\"http://news.ycombinator.com/submitlink?u=\" + url + \"&t=\" + title, 770, 500);\n break;\n case \"telegram\":\n SocialShareButton.openUrl(\"https://telegram.me/share/url?text=\" + title + \"&url=\" + url);\n break;\n case \"whatsapp_app\":\n whatsapp_app_url = \"whatsapp://send?text=\" + title + \"%0A\" + url;\n window.open(whatsapp_app_url, '_top');\n break;\n case \"whatsapp_web\":\n SocialShareButton.openUrl(\"https://web.whatsapp.com/send?text=\" + title + \"%0A\" + url);\n }\n return false;\n }\n };\n \n }).call(this);"],"sourceRoot":""}