{"version":3,"names":[],"mappings":"","sources":["banner-interno.js"],"sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i\\n \\n\\n
\\n \\n
\\n \\n
\\n {{ uploadMsg }}\\n
\\n \\n \",\n data: function data() {\n return {\n picFolderUrl: '/PublishingImages/banners-internos',\n uploadMsg: '',\n pictureURL: '',\n bannerImgSrc: '',\n isLogged: _spPageContextInfo.userId,\n pageID: _spPageContextInfo.pageItemId,\n bannerImg: {},\n listUrl: _spPageContextInfo.webServerRelativeUrl + \"paginas\",\n blur: false,\n clientContext: '',\n listItemCol: '',\n pageName: _spPageContextInfo.serverRequestPath.toLowerCase().split('/paginas/')[1]\n\n };\n },\n\n methods: {\n getList: function getList() {\n return $pnp.sp.web.getList(this.listUrl);\n },\n onClickAlterarFoto: function onClickAlterarFoto() {\n this.$refs.fileUploader.showUploadWindow();\n },\n onChangeFoto: function onChangeFoto(files) {\n var _this = this;\n\n if (files.length) {\n this.blur = true;\n this.applyHoverEffects();\n this.uploadMsg = 'Carregando Banner';\n\n this.$refs.fileUploader.upload().then(function (result) {\n var picUrl = result[0].data.ServerRelativeUrl;\n _this.uploadMsg = 'Atualizando Banner';\n _this.updateBanner(picUrl);\n return _this.updateFoto(picUrl, _this.pageID).then(function () {\n _this.blur = false;\n return picUrl;\n });\n }).then(function (picUrl) {\n _this.pictureURL = picUrl;\n _this.uploadMsg = '';\n });\n }\n },\n\n updateFoto: function updateFoto(picUrl, id) {\n var _this2 = this;\n\n this.blur = false;\n this.applyHoverEffects();\n return this.getList().items.getById(id).update({\n LinkImagem: picUrl\n }).then(function () {\n _this2.publishFile();\n });\n },\n setImg: function setImg(img) {\n var _this3 = this;\n\n if (window.location.href.includes('noticias') || window.location.href.includes('area')) {\n\n setTimeout(function () {\n var link = $(\".banner-interno img\")[0].src || '';\n if (!link.includes('PublishingImages')) {\n _this3.bannerImgSrc = img;\n }\n }, 1000);\n return this.bannerImgSrc;\n }\n return img;\n },\n publishFile: function publishFile() {\n SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () {\n var oFile;\n //Get client context and web\n var clientContext = new SP.ClientContext();\n var oWeb = clientContext.get_web();\n //Get List and File object\n var oList = oWeb.get_lists().getByTitle('Pages');\n oFile = oWeb.getFileByServerRelativeUrl(_spPageContextInfo.serverRequestPath);\n //Publish the file and execute the batch\n //oFile.publish();\n clientContext.load(oFile);\n clientContext.executeQueryAsync(function () {\n var majorVersion = oFile.get_majorVersion();\n window.location.reload();\n }, QueryFailure);\n });\n\n function QueryFailure(sender, args) {\n console.log('Request failed - ' + args.get_message());\n }\n },\n updateBanner: function updateBanner(picUrl) {\n this.pictureURL = picUrl;\n $('.picture').attr('src', this.pictureURL);\n this.blur = false;\n this.applyHoverEffects();\n },\n getBannerPage: function getBannerPage() {\n var _this4 = this;\n\n return $pnp.sp.web.getList(\"/paginas\").items.filter(\"Id eq \" + this.pageID).select('Title, LinkImagem').top(1).get().then(function (banner) {\n Vue.set(_this4, 'bannerImg', banner[0]);\n }).catch(function (err) {\n _this4.threatError(err, 'Erro ao carregar o banner');\n });\n },\n threatError: function threatError(err, msg) {\n uploadMsg = msg + \" - \" + err;\n console.error(err);\n },\n applyHoverEffects: function applyHoverEffects() {\n if (this.blur) {\n $('.picture').attr(\"style\", 'filter: blur(10px);-webkit-filter: blur(10px)');\n } else {\n $('.picture').removeAttr('style');\n }\n }\n },\n created: function created() {\n this.getBannerPage();\n }\n});\n\nvar app = new Vue({\n el: \"#banner-interno\",\n template: \"\"\n});\n\n},{}]},{},[1])\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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ICAgICAgICByZWY9XCJmaWxlVXBsb2FkZXJcIlxyXG4gICAgICAgICAgICAgICAgOmZvbGRlci11cmw9XCJwaWNGb2xkZXJVcmxcIlxyXG4gICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwidXBsb2FkaW5nXCIgdi1pZj1cInVwbG9hZE1zZyAhPSAnJ1wiIDpjbGFzcz1cInVwbG9hZE1zZyAhPSAnJyA/ICdzaG93JzogJydcIj5cclxuICAgICAgICAgICAgICAgIDxzcGFuPnt7IHVwbG9hZE1zZyB9fTwvc3Bhbj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgPC9kaXY+XHJcbiAgICBgLFxyXG4gICAgZGF0YSgpIHtcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBwaWNGb2xkZXJVcmw6ICcvUHVibGlzaGluZ0ltYWdlcy9iYW5uZXJzLWludGVybm9zJyxcclxuICAgICAgICAgICAgdXBsb2FkTXNnOiAnJyxcclxuICAgICAgICAgICAgcGljdHVyZVVSTDogJycsXHJcbiAgICAgICAgICAgIGJhbm5lckltZ1NyYzogJycsXHJcbiAgICAgICAgICAgIGlzTG9nZ2VkOiBfc3BQYWdlQ29udGV4dEluZm8udXNlcklkLFxyXG4gICAgICAgICAgICBwYWdlSUQ6IF9zcFBhZ2VDb250ZXh0SW5mby5wYWdlSXRlbUlkLFxyXG4gICAgICAgICAgICBiYW5uZXJJbWc6IHt9LFxyXG4gICAgICAgICAgICBsaXN0VXJsOiBgJHtfc3BQYWdlQ29udGV4dEluZm8ud2ViU2VydmVyUmVsYXRpdmVVcmx9cGFnaW5hc2AsXHJcbiAgICAgICAgICAgIGJsdXI6IGZhbHNlLFxyXG4gICAgICAgICAgICBjbGllbnRDb250ZXh0OiAnJyxcclxuICAgICAgICAgICAgbGlzdEl0ZW1Db2w6ICcnLFxyXG4gICAgICAgICAgICBwYWdlTmFtZTogX3NwUGFnZUNvbnRleHRJbmZvLnNlcnZlclJlcXVlc3RQYXRoLnRvTG93ZXJDYXNlKCkuc3BsaXQoJy9wYWdpbmFzLycpWzFdXHJcblxyXG4gICAgICAgIH1cclxuICAgIH0sXHJcbiAgICBtZXRob2RzOiB7XHJcbiAgICAgICAgZ2V0TGlzdDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICByZXR1cm4gJHBucC5zcC53ZWIuZ2V0TGlzdCh0aGlzLmxpc3RVcmwpXHJcbiAgICAgICAgfSxcclxuICAgICAgICBvbkNsaWNrQWx0ZXJhckZvdG8oKSB7XHJcbiAgICAgICAgICAgIHRoaXMuJHJlZnMuZmlsZVVwbG9hZGVyLnNob3dVcGxvYWRXaW5kb3coKVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgb25DaGFuZ2VGb3RvKGZpbGVzKSB7XHJcbiAgICAgICAgICAgIGlmIChmaWxlcy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuYmx1ciA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmFwcGx5SG92ZXJFZmZlY3RzKClcclxuICAgICAgICAgICAgICAgIHRoaXMudXBsb2FkTXNnID0gJ0NhcnJlZ2FuZG8gQmFubmVyJztcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLiRyZWZzLmZpbGVVcGxvYWRlci51cGxvYWQoKVxyXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKChyZXN1bHQpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBpY1VybCA9IHJlc3VsdFswXS5kYXRhLlNlcnZlclJlbGF0aXZlVXJsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXBsb2FkTXNnID0gJ0F0dWFsaXphbmRvIEJhbm5lcic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlQmFubmVyKHBpY1VybCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnVwZGF0ZUZvdG8ocGljVXJsLCB0aGlzLnBhZ2VJRClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmJsdXIgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGljVXJsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oKHBpY1VybCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBpY3R1cmVVUkwgPSBwaWNVcmxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy51cGxvYWRNc2cgPSAnJ1xyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIHVwZGF0ZUZvdG86IGZ1bmN0aW9uIChwaWNVcmwsIGlkKSB7XHJcbiAgICAgICAgICAgIHRoaXMuYmx1ciA9IGZhbHNlO1xyXG4gICAgICAgICAgICB0aGlzLmFwcGx5SG92ZXJFZmZlY3RzKClcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0TGlzdCgpLml0ZW1zXHJcbiAgICAgICAgICAgICAgICAuZ2V0QnlJZChpZClcclxuICAgICAgICAgICAgICAgIC51cGRhdGUoe1xyXG4gICAgICAgICAgICAgICAgICAgIExpbmtJbWFnZW06IHBpY1VybFxyXG4gICAgICAgICAgICAgICAgfSkudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wdWJsaXNoRmlsZSgpXHJcbiAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgc2V0SW1nKGltZykge1xyXG4gICAgICAgICAgICBpZiAod2luZG93LmxvY2F0aW9uLmhyZWYuaW5jbHVkZXMoJ25vdGljaWFzJykgfHwgd2luZG93LmxvY2F0aW9uLmhyZWYuaW5jbHVkZXMoJ2FyZWEnKSkge1xyXG5cclxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmsgPSAkKGAuYmFubmVyLWludGVybm8gaW1nYClbMF0uc3JjICB8fCAnJ1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghbGluay5pbmNsdWRlcygnUHVibGlzaGluZ0ltYWdlcycpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYmFubmVySW1nU3JjID0gaW1nO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sIDEwMDApO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYmFubmVySW1nU3JjO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBpbWdcclxuICAgICAgICB9LFxyXG5cclxuICAgICAgICBwdWJsaXNoRmlsZSgpIHtcclxuICAgICAgICAgICAgU1AuU09ELmV4ZWN1dGVGdW5jKCdzcC5qcycsICdTUC5DbGllbnRDb250ZXh0JywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIG9GaWxlO1xyXG4gICAgICAgICAgICAgICAgLy9HZXQgY2xpZW50IGNvbnRleHQgYW5kIHdlYlxyXG4gICAgICAgICAgICAgICAgdmFyIGNsaWVudENvbnRleHQgPSBuZXcgU1AuQ2xpZW50Q29udGV4dCgpO1xyXG4gICAgICAgICAgICAgICAgdmFyIG9XZWIgPSBjbGllbnRDb250ZXh0LmdldF93ZWIoKTtcclxuICAgICAgICAgICAgICAgIC8vR2V0IExpc3QgYW5kIEZpbGUgb2JqZWN0XHJcbiAgICAgICAgICAgICAgICB2YXIgb0xpc3QgPSBvV2ViLmdldF9saXN0cygpLmdldEJ5VGl0bGUoJ1BhZ2VzJyk7XHJcbiAgICAgICAgICAgICAgICBvRmlsZSA9IG9XZWIuZ2V0RmlsZUJ5U2VydmVyUmVsYXRpdmVVcmwoX3NwUGFnZUNvbnRleHRJbmZvLnNlcnZlclJlcXVlc3RQYXRoKTtcclxuICAgICAgICAgICAgICAgIC8vUHVibGlzaCB0aGUgZmlsZSBhbmQgZXhlY3V0ZSB0aGUgYmF0Y2hcclxuICAgICAgICAgICAgICAgIC8vb0ZpbGUucHVibGlzaCgpO1xyXG4gICAgICAgICAgICAgICAgY2xpZW50Q29udGV4dC5sb2FkKG9GaWxlKTtcclxuICAgICAgICAgICAgICAgIGNsaWVudENvbnRleHQuZXhlY3V0ZVF1ZXJ5QXN5bmMoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBtYWpvclZlcnNpb24gPSBvRmlsZS5nZXRfbWFqb3JWZXJzaW9uKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLnJlbG9hZCgpO1xyXG4gICAgICAgICAgICAgICAgfSwgUXVlcnlGYWlsdXJlKTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBmdW5jdGlvbiBRdWVyeUZhaWx1cmUoc2VuZGVyLCBhcmdzKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnUmVxdWVzdCBmYWlsZWQgLSAnICsgYXJncy5nZXRfbWVzc2FnZSgpKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICB9LFxyXG4gICAgICAgIHVwZGF0ZUJhbm5lcihwaWNVcmwpIHtcclxuICAgICAgICAgICAgdGhpcy5waWN0dXJlVVJMID0gcGljVXJsO1xyXG4gICAgICAgICAgICAkKCcucGljdHVyZScpLmF0dHIoJ3NyYycsIHRoaXMucGljdHVyZVVSTCk7XHJcbiAgICAgICAgICAgIHRoaXMuYmx1ciA9IGZhbHNlO1xyXG4gICAgICAgICAgICB0aGlzLmFwcGx5SG92ZXJFZmZlY3RzKClcclxuICAgICAgICB9LFxyXG4gICAgICAgIGdldEJhbm5lclBhZ2UoKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAkcG5wLnNwLndlYi5nZXRMaXN0KGAvcGFnaW5hc2ApLml0ZW1zXHJcbiAgICAgICAgICAgICAgICAuZmlsdGVyKGBJZCBlcSAke3RoaXMucGFnZUlEfWApXHJcbiAgICAgICAgICAgICAgICAuc2VsZWN0KCdUaXRsZSwgTGlua0ltYWdlbScpXHJcbiAgICAgICAgICAgICAgICAudG9wKDEpXHJcbiAgICAgICAgICAgICAgICAuZ2V0KCkudGhlbigoYmFubmVyKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgVnVlLnNldCh0aGlzLCAnYmFubmVySW1nJywgYmFubmVyWzBdKTtcclxuICAgICAgICAgICAgICAgIH0pLmNhdGNoKChlcnIpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnRocmVhdEVycm9yKGVyciwgJ0Vycm8gYW8gY2FycmVnYXIgbyBiYW5uZXInKTtcclxuICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgfSxcclxuICAgICAgICB0aHJlYXRFcnJvcihlcnIsIG1zZykge1xyXG4gICAgICAgICAgICB1cGxvYWRNc2cgPSBgJHttc2d9IC0gJHtlcnJ9YDtcclxuICAgICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpXHJcbiAgICAgICAgfSxcclxuICAgICAgICBhcHBseUhvdmVyRWZmZWN0cygpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMuYmx1cikge1xyXG4gICAgICAgICAgICAgICAgJCgnLnBpY3R1cmUnKS5hdHRyKGBzdHlsZWAsICdmaWx0ZXI6IGJsdXIoMTBweCk7LXdlYmtpdC1maWx0ZXI6IGJsdXIoMTBweCknKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICQoJy5waWN0dXJlJykucmVtb3ZlQXR0cignc3R5bGUnKVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIGNyZWF0ZWQoKSB7XHJcbiAgICAgICAgdGhpcy5nZXRCYW5uZXJQYWdlKClcclxuICAgIH0sXHJcbn0pO1xyXG5cclxudmFyIGFwcCA9IG5ldyBWdWUoe1xyXG4gICAgZWw6IGAjYmFubmVyLWludGVybm9gLFxyXG4gICAgdGVtcGxhdGU6IGA8YmFubmVyLWludGVybm8vPmBcclxufSkiXX0=\n"],"file":"banner-interno.js"}