bim_gdpr-1.0.0-rc3/libraries/dist/templates/quick-template/quick-template.js

libraries/dist/templates/quick-template/quick-template.js
!function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=8)}({0:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return d}));const s="bgdpr",i="data-"+s+"-",r="https://cdn.jsdelivr.net/gh/tsecher/bim-gdpr@master/",c="%",a=function(e,t){return(e=e.weight)>(t=t.weight)?1:e<t?-1:0},d=function(e,t,n=!0){const s=[];for(let n in e){const i=typeof e[n],r=typeof t[n];i!==r&&s.push({type:i,name:n,value:t[n],valueType:r})}if(s.length){if(n){const n="\r\n\t - ";throw`The object ${t} does not match interface ${e}. Here are missing or bad typed properties : ${n+s.map(e=>`waiting for ${e.name} (${e.type}) and got value ${e.value} (${e.valueType}) `).join(n)} \r\n Please check the doc to make your service valid`}return!1}return!0}},10:function(e,t,n){"use strict";n.r(t);var s=n(0);class i{constructor(){this.id="quick_template",this.defaultLanguage="en"}init(){try{this.initPersistentButton()}catch(e){document.addEventListener("DOMContentLoaded",()=>this.initPersistentButton())}return this}initPersistentButton(){const e=document.createElement("div");return e.classList.add(s.b+"-persistent"),e.setAttribute(s.d+"view-show",""),e.innerHTML=`<svg class="${s.b}-persistent-logo" viewBox="0 0 100 100" x="0" y="0" xmlns="http://www.w3.org/2000/svg">\n            <g stroke="null" transform="rotate(-151.4181365966797 48.95931625366211,49.56866073608398) " id="svg_21">\n                <path stroke="null" d="m48.17258,38.18804c0.49484,-0.53886 0.49484,-1.34714 0,-1.886c-0.49483,-0.53885 -1.23709,-0.53885 -1.73193,0c-0.49483,0.53886 -0.49483,1.34714 0,1.886c0.49484,0.53885 1.23709,0.53885 1.73193,0z" id="svg_5"/>\n                <path stroke="null" d="m69.05544,29.92053c0.49483,-0.53886 0.49483,-1.34714 0,-1.886c-0.49484,-0.53886 -1.23709,-0.53886 -1.73193,0c-0.49484,0.53885 -0.49484,1.34714 0,1.886c0.49483,0.53886 1.23709,0.53886 1.73193,0z" id="svg_6"/>\n                <path stroke="null" d="m58.51677,52.40708c-0.49483,0.53885 -0.49483,1.34714 0,1.886c0.49484,0.53885 1.23709,0.53885 1.73193,0c0.49483,-0.53886 0.49483,-1.34714 0,-1.886c-0.49484,-0.40414 -1.3608,-0.40414 -1.73193,0z" id="svg_7"/>\n                <path stroke="null" d="m77.59722,53.5927c0.49483,-0.53885 0.49483,-1.48185 0,-1.886c-0.49484,-0.53885 -1.23709,-0.53885 -1.73193,0c-0.49484,0.53886 -0.49484,1.34714 0,1.886c0.49483,0.53886 1.3608,0.53886 1.73193,0z" id="svg_8"/>\n                <path stroke="null" d="m57.17749,63.97774c-0.49484,0.53885 -0.49484,1.34714 0,1.886c0.49483,0.53886 1.23709,0.53886 1.73193,0c0.49484,-0.53886 0.49484,-1.34714 0,-1.886c-0.49484,-0.53886 -1.23709,-0.53886 -1.73193,0z" id="svg_9"/>\n                <path stroke="null" d="m44.60901,68.26883c-0.49483,0.53885 -0.49483,1.34714 0,1.886c0.49484,0.53886 1.23709,0.53886 1.73193,0c0.49484,-0.53886 0.49484,-1.34714 0,-1.886c-0.37113,-0.53886 -1.23709,-0.53886 -1.73193,0z" id="svg_10"/>\n                <path stroke="null" d="m31.80418,76.47433c2.84531,0 5.19579,-2.55957 5.19579,-5.658s-2.35047,-5.65799 -5.19579,-5.65799c-2.84531,0 -5.19578,2.55957 -5.19578,5.65799s2.35047,5.658 5.19578,5.658zm0,-8.6217c1.48451,0 2.7216,1.34714 2.7216,2.96371s-1.23709,2.96371 -2.7216,2.96371s-2.7216,-1.34714 -2.7216,-2.96371s1.23709,-2.96371 2.7216,-2.96371z" id="svg_22"/>\n                <path stroke="null" d="m71.81582,49.07742c2.84531,0 5.19579,-2.55957 5.19579,-5.65799s-2.35047,-5.658 -5.19579,-5.658c-2.84531,0 -5.19578,2.55957 -5.19578,5.658s2.35047,5.65799 5.19578,5.65799zm0,-8.6217c1.48451,0 2.7216,1.34714 2.7216,2.96371s-1.23709,2.96371 -2.7216,2.96371s-2.7216,-1.34714 -2.7216,-2.96371s1.23709,-2.96371 2.7216,-2.96371z" id="svg_11"/>\n                <path stroke="null" d="m53.31081,21.66073c0,3.09843 2.35047,5.658 5.19578,5.658s5.19579,-2.55957 5.19579,-5.658s-2.35047,-5.65799 -5.19579,-5.65799s-5.19578,2.55957 -5.19578,5.65799zm5.19578,-2.96371c1.48451,0 2.7216,1.34714 2.7216,2.96371s-1.23709,2.96371 -2.7216,2.96371s-2.7216,-1.34714 -2.7216,-2.96371s1.23709,-2.96371 2.7216,-2.96371z" id="svg_12"/>\n                <path stroke="null" d="m49.84111,57.09662c2.96902,0 5.3195,-2.55957 5.19579,-6.06214c0,0 0,0 0,0c0,0 0,0 0,-0.13471c-0.49484,-7.13985 -10.39158,-6.60099 -10.39158,0.53885c0,3.09843 2.35047,5.658 5.19579,5.658zm0,-2.69428c-1.48451,0 -2.7216,-1.34714 -2.7216,-2.96371c0,-1.21243 0.61855,-2.15542 1.60822,-2.69428c1.73193,-0.80829 3.71128,0.13471 3.83499,2.42486c0.12371,1.886 -1.23709,3.23314 -2.7216,3.23314z" id="svg_13"/>\n                <path stroke="null" d="m24.13545,68.42032c2.47418,-1.61657 3.34015,-4.98442 1.85564,-7.67871c-1.48451,-2.69428 -4.57724,-3.63728 -7.05143,-2.02071c-2.47418,1.61657 -3.34015,4.98442 -1.85564,7.67871c1.3608,2.69429 4.45353,3.63728 7.05142,2.02071zm-3.95869,-7.40928c1.3608,-0.80829 2.96902,-0.40414 3.71128,1.07771c0.74226,1.48186 0.24742,3.23314 -0.98967,4.04143c-1.23709,0.80829 -2.96902,0.26943 -3.71128,-1.07771c-0.86596,-1.48186 -0.37113,-3.23314 0.98967,-4.04143z" id="svg_23"/>\n                <path stroke="null" d="m31.41029,47.62506c2.47418,-1.61657 3.34015,-4.98442 1.85564,-7.67871c-1.48451,-2.69428 -4.57724,-3.63728 -7.05142,-2.02071c-2.47419,1.61657 -3.34015,4.98442 -1.85564,7.67871c1.3608,2.69428 4.45353,3.63728 7.05142,2.02071zm-3.95869,-7.40928c1.3608,-0.80829 2.96902,-0.26943 3.71128,1.07771c0.74226,1.48186 0.24742,3.23314 -0.98968,4.04143c-1.23709,0.80828 -2.96902,0.26943 -3.71127,-1.07772c-0.86596,-1.48186 -0.37113,-3.23314 0.98967,-4.04142z" id="svg_14"/>\n                <path stroke="null" d="m48.24245,27.65353c0.37113,0 0.61854,-0.13471 0.86596,-0.40414c0.24742,-0.26943 0.37113,-0.53885 0.37113,-0.943c0,-0.40414 -0.12371,-0.67357 -0.37113,-0.943c-0.49484,-0.53886 -1.23709,-0.53886 -1.73193,0c-0.24742,0.26943 -0.37113,0.53886 -0.37113,0.943c0,0.40414 0.12371,0.67357 0.37113,0.943c0.24742,0.26943 0.49484,0.40414 0.86597,0.40414z" id="svg_15"/>\n                <path stroke="null" d="m35.10988,56.00984c-0.49483,0.53885 -0.49483,1.34714 0,1.886c0.49484,0.53885 1.23709,0.53885 1.73193,0c0.49484,-0.53886 0.49484,-1.34714 0,-1.886c-0.37113,-0.53886 -1.23709,-0.53886 -1.73193,0z" id="svg_16"/>\n                <path stroke="null" d="m27.89135,53.23581c0.49484,-0.53886 0.49484,-1.34714 0,-1.886c-0.49483,-0.53886 -1.23709,-0.53886 -1.73193,0c-0.49484,0.53885 -0.49484,1.34714 0,1.886c0.49484,0.53886 1.23709,0.53886 1.73193,0z" id="svg_17"/>\n                <path stroke="null" d="m34.07281,27.94731c-7.5095,1.81759 -13.8534,6.67305 -17.95237,13.71924c-4.2973,7.38714 -7.55788,16.34439 -5.44803,24.81721c2.10985,8.47282 9.47479,15.90324 16.66775,19.92341c0.41823,0.28936 0.93024,0.16543 1.23314,-0.10317c1.92193,-1.53929 4.41587,-2.04528 6.66692,-1.12542c0.48435,0.17571 0.99636,0.05178 1.32692,-0.51646c1.59747,-2.24193 4.08064,-3.23354 6.66225,-2.88193c2.58162,0.35161 4.71122,1.98439 5.86604,4.53663c0.46746,0.96097 1.63449,0.97144 2.16338,0.06226c1.52058,-2.61391 4.20208,-3.94646 7.02048,-3.74981c1.65137,0.18618 5.97023,-6.22971 7.1218,-8.46136c12.62961,-3.05686 21.94792,-12.2058 22.48867,-26.49543c0.32876,-8.37953 -4.58345,-20.56865 -9.90371,-26.79973c-5.21569,-6.15874 -10.2822,-8.38894 -17.97782,-8.77217c-10.37101,-0.32156 -20.46967,5.44269 -25.93543,15.84674zm24.00958,51.99551c-2.88451,-0.08301 -5.67057,1.1772 -7.54327,3.38811c-1.56226,-2.35597 -4.03321,-3.90613 -6.7855,-4.21644c-3.13207,-0.41368 -6.19336,0.81551 -8.30285,3.18137c-2.55395,-0.65125 -5.32312,-0.1763 -7.52028,1.33196c-6.22426,-3.66875 -12.88497,-10.29317 -14.80259,-17.83604c-1.99451,-7.91486 1.11696,-15.85955 5.14981,-22.79209c7.80125,-13.4105 27.07321,-16.78112 39.30651,-8.31741c14.78114,10.38585 13.43498,32.85291 0.49817,45.26054zm18.33386,-57.12778c4.75901,5.68339 9.45133,17.24221 9.13946,24.83648c-0.4132,12.30583 -8.0187,19.7708 -18.5787,23.3032c5.45642,-13.91707 3.99209,-30.04038 -8.13666,-38.43176c-5.54158,-3.83399 -15.01778,-5.95901 -21.48636,-5.17453c5.13987,-8.07931 13.58105,-12.75886 22.71892,-12.33412c7.0406,0.24883 11.51821,2.23098 16.34334,7.80073z" id="svg_18"/>\n            </g>\n      </svg>`,document.querySelector("body").append(e),this}getDefaultCssList(){return[s.a+"src/templates/quick_template/dist/quick_template.css"]}getDefaultTranslations(){return[s.a+`src/templates/quick_template/translations/${s.c}.json`]}getShowPromise(){return new Promise(e=>{window.setTimeout(()=>{e()},100)})}getHidePromise(){return new Promise(e=>{window.setTimeout(()=>{e()},100)})}wrapper(e){return`\n        <style>.${s.b}-view{ opacity:0} </style>\n        <div class="${s.b}-view-wrapper">\n            <svg class="${s.b}-view-hide" ${s.d}view-hide viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n                <g>\n                    <rect transform="rotate(135 50,50.45312118530273) " id="svg_2" height="8" width="70" y="46.45312" x="15" stroke-width="1.5" fill="#000"/>\n                    <rect transform="rotate(45 50.00000000000001,50.453125) " id="svg_1" height="8" width="70" y="46.45313" x="15" stroke-width="1.5" fill="#000"/>\n                </g>\n            </svg>\n            <div class="${s.b}-view">\n                <div class="${s.b}-view-content">\n                    ${e}\n                </div>\n            </div>\n        </div>`}getNoServiceMarkup(){const e=`\n        <div class="${s.b}-view-main">\n            <div class="${s.b}-view-head">\n                ${this.html("This site does not declare any service that could use your personal data")}\n            </div>\n        </div>`;return this.wrapper(e)}getViewMarkup(e){let t="";switch(e.type){case"groups":t=e.groups.join("");break;case"services":t=e.services.join("")}const n=`\n            <div class="${s.b}-view-main">\n                <div class="${s.b}-view-head"> \n                    <div class="head-wrapper">\n                        <div class="${s.b}-view-content-title">${this.html("Your personal data")}</div>      \n                        <div>${this.html("This site uses some services that enhance your user experience and adds external content. Some of them can require and use personal data. You can manage their activation through this pannel at any moment.")}</div>\n                    </div>\n                  \n                    <div class="${s.b}-view-detail">\n                        ${t}\n                    </div>\n                </div>\n\n                <div class="${s.b}-view-quick">\n                    <div class="action">\n                        <button ${s.d}all-enable="accept_all">\n                            <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n                                <g id="valid">\n                                    <rect transform="rotate(135 60.709205627441406,52.107933044433594) " id="svg_2" height="8" width="70" y="48.10793" x="25.70921" stroke-width="1.5" fill="#000"/>\n                                    <rect stroke="null" transform="rotate(45 30.14121246337889,65.61316680908203) " id="svg_1" height="8" width="31.10913" y="61.61317" x="14.58665" stroke-width="1.5" fill="#000"/>\n                                </g>\n                            </svg>\n                            ${this.html("Enable all")}\n                        </button>\n                        <button ${s.d}view-hide="deny_all">${this.html("Save")}</button>\n                    </div>\n                    \n                    <button ${s.d}view-toggle-detail>${this.html("Detail")}</button>\n                </div>\n            </div>\n           `;return this.wrapper(n)}getGroupMarkup(e,t){return`\n                <div class="${s.b}-view-group-head line" ${s.d}group="${e.id}" ${s.d}status="${e.status}">\n                    <div class="line-accept" ${s.d}group-toggle="${e.id}">\n                        <svg class="enable" viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n                            <use xlink:href="#valid"></use>\n                        </svg>\n                    </div>\n                    <div class="line-content">\n                        <div class="${s.b}-view-group-name title" ${s.d}group-toggle="${e.id}">${this.html(e.name)}${this.getMandatoryText(e)}</div>\n                        <div class="${s.b}-view-group-description description sec">${this.html(e.description)}</div>\n                    </div>\n                </div>\n\n                <div class="${s.b}-view-group-services">\n                    ${t.join("")}\n                </div>\n        `}getServiceMarkup(e){const t=e.doc?`<a href="${e.doc}" class="doc sec" target="_blank">${e.doc}</a>`:"";return`\n            <div class="${s.b}-view-service line"  ${s.d}service="${e.id}" ${s.d}status="${e.status}">\n                <div class="line-accept" ${s.d}service-toggle="${e.id}">\n                    <svg class="enable" viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n                        <use xlink:href="#valid"></use>\n                    </svg>\n                </div>\n                <div class="line-content">\n                    <div class="${s.b}-view-service-name title" ${s.d}service-toggle="${e.id}">${this.html(e.name)}${this.getMandatoryText(e)}</div>\n                    <div class="${s.b}-view-service-description description sec">${this.html(e.description)}</div>\n                    ${t}\n                </div>\n            </div>\n        `}getMandatoryText(e){return e.isMandatory()?` <span class='mandatory-mention'>${this.html("(mandatory for the basic features)")}</span>`:""}initDefaultPlaceholder(e,t){e.classList.add("bgdpr-placeholder");const n={"@serviceName":this.html(t.name)};return`${this.html("This content may require your personal data. You have to accept the service @serviceName to use it before accessing that content.",n)}<br/><button ${s.d}service-enable="${t.id}">${this.html("Enable @serviceName",n)}</button>`}}window[s.b]=window[s.b]||{},window[s.b].template_class=window[s.b].template_class||{},window[s.b].template_class.QuickTemplate=i,bgdpr&&void 0!==drupalSettings.bim_gdpr&&document.addEventListener("DOMContentLoaded",(function(){var e=drupalSettings.bim_gdpr.translation;bgdpr.getLocalManager().setUserLanguage(drupalSettings.bim_gdpr.currentLanguage),bgdpr.addTranslation(e);var t=bgdpr.setTemplate(new i);1===drupalSettings.bim_gdpr.template_settings.no_css&&t.getTemplate().setCssList([]),bgdpr.init()}))},8:function(e,t,n){e.exports=n(10)}});

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc